Define a replacement for Restconf{Error,Exception,Future}
Server-side API is opinionated about how it reports errors. This patch
defines:
- ErrorMessage to hold the RFC6241 definition of what is an error
message
- ServerError to replace RestconfError
- ServerErrorInfo to hold the error-info element
- ServerErrorPath to hold the error-path element
- ServerException to replace RestconfDocumentedException
ServerException has a more logical API, holding only a single error and
performing explicit mapping when instantiated with just a Throwable
cause. This mode of operation maps:
- IllegalArgumentException to ErrorTag.INVALID_VALUE
- UnsupportedOperationException to ErrorTag.OPERATION_NOT_SUPPORTED
JIRA: NETCONF-1188
Change-Id: I07e7a9a56e4e02c699ead96bed1c115136767c4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>