- status = this.transactionProvider.commitTransaction();
- } catch (final IllegalStateException e) {
- // FIXME: when can IllegalStateException occur?
- logger.warn("Commit failed: ", e);
- final Map<String, String> errorInfo = new HashMap<>();
- errorInfo.put(ErrorTag.operation_failed.name(),
- "Operation failed. Use 'get-config' or 'edit-config' before triggering 'commit' operation");
- throw new NetconfDocumentedException(e.getMessage(), e, ErrorType.application, ErrorTag.operation_failed,
- ErrorSeverity.error, errorInfo);
- } catch (ValidationException e) {
- throw NetconfDocumentedException.wrap(e);
- } catch (ConflictingVersionException e) {
- throw NetconfDocumentedException.wrap(e);
-
+ status = getConfigSubsystemFacade().commitTransaction();
+ LOG.trace("Datastore {} committed successfully: {}", Datastore.candidate, status);
+ } catch (ConflictingVersionException | ValidationException e) {
+ throw DocumentedException.wrap(e);