- } catch (final IOException e) {
- throw new CpsException("Failed to read yang resource.",
- String.format("Exception occurred on reading resource %s.", resourceName), e);
- } catch (final YangSyntaxErrorException e) {
- throw new ModelValidationException("Yang resource is invalid.",
- String.format(
- "Yang syntax validation failed for resource %s:%n%s", resourceName, e.getMessage()), e);
+ } catch (final Exception exception) {
+ throw new ModelValidationException("Yang resource processing exception.",
+ String.format("Could not process resource %s:%n%s", resourceName, exception.getMessage()),
+ exception);