- Config cfg = getConfigMapping(configRegistryClient, yangStoreSnapshot.getModuleMXBeanEntryMap());
- try {
- editConfigExecution = editConfigXmlParser.fromXml(xml, cfg, transactionProvider, configRegistryClient);
- } catch (IllegalStateException e) {
- logger.warn("Error parsing xml", e);
- final Map<String, String> errorInfo = new HashMap<>();
- errorInfo.put(ErrorTag.missing_attribute.name(), "Error parsing xml: " + e.getMessage());
- throw new NetconfDocumentedException(e.getMessage(), ErrorType.rpc, ErrorTag.missing_attribute,
- ErrorSeverity.error, errorInfo);
- } catch (final IllegalArgumentException e) {
- logger.warn("Error parsing xml", e);
- final Map<String, String> errorInfo = new HashMap<>();
- errorInfo.put(ErrorTag.bad_attribute.name(), e.getMessage());
- throw new NetconfDocumentedException(e.getMessage(), ErrorType.rpc, ErrorTag.bad_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 'edit-config'");
- throw new NetconfDocumentedException(e.getMessage(), ErrorType.application,
- ErrorTag.operation_not_supported, ErrorSeverity.error, errorInfo);
- }