- try {
- source = fromXml(xml);
- } catch (final IllegalArgumentException e) {
- logger.warn("Rpc error: {}", ErrorTag.bad_attribute, e);
- final Map<String, String> errorInfo = new HashMap<>();
- errorInfo.put(ErrorTag.bad_attribute.name(), e.getMessage());
- throw new NetconfDocumentedException(e.getMessage(), e, ErrorType.rpc, ErrorTag.bad_attribute,
- ErrorSeverity.error, errorInfo);
- } catch (final IllegalStateException e) {
- logger.warn("Rpc error: {}", ErrorTag.missing_attribute, e);
- final Map<String, String> errorInfo = new HashMap<>();
- errorInfo.put(ErrorTag.missing_attribute.name(), "Missing datasource attribute value");
- throw new NetconfDocumentedException(e.getMessage(), e, ErrorType.rpc, ErrorTag.missing_attribute,
- ErrorSeverity.error, errorInfo);
- } catch (final UnsupportedOperationException e) {
- logger.warn("Unsupported", e);
- final Map<String, String> errorInfo = new HashMap<>();
- errorInfo.put(ErrorTag.operation_not_supported.name(), "Unsupported option for get");
- throw new NetconfDocumentedException(e.getMessage(), e, ErrorType.application,
- ErrorTag.operation_not_supported, ErrorSeverity.error, errorInfo);
- }
- return getResponseInternal(document, configRegistryClient, source);