- fromXml(xml);
- } catch (final IllegalArgumentException e) {
- //FIXME where can IllegalStateException be thrown?
- 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);
- }
-
- try {
- this.transactionProvider.abortTransaction();
- } catch (final IllegalStateException e) {
- //FIXME where can IllegalStateException be thrown?
- logger.warn("Abort failed: ", e);
+ if (transactionProvider.getTransaction().isPresent()) {
+ this.transactionProvider.abortTransaction();
+ }
+ } catch (final RuntimeException e) {
+ LOG.warn("Abort failed: ", e);