- Preconditions.checkArgument(subsequentOperation.isExecutionTermination(),
- "No netconf operation expected to be subsequent to %s, but is %s", this, subsequentOperation);
+ if (!subsequentOperation.isExecutionTermination()){
+ throw new NetconfDocumentedException(String.format("No netconf operation expected to be subsequent to %s, but is %s", this, subsequentOperation),
+ NetconfDocumentedException.ErrorType.application,
+ NetconfDocumentedException.ErrorTag.malformed_message,
+ NetconfDocumentedException.ErrorSeverity.error);
+ }