2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.common;
11 * Representation of an error.
13 public interface RpcError {
15 * Returns the error severity, as determined by the application reporting the error.
17 * @return an {@link ErrorSeverity} enum.
19 ErrorSeverity getSeverity();
22 * Returns a short string that identifies the general type of error condition.
25 * The following outlines suggested values as defined by
26 * (<a href="https://tools.ietf.org/html/rfc6241#page-89">RFC6241</a>):
41 * operation-not-supported
49 * @return a string if available or null otherwise.
54 * Returns a short string that identifies the specific type of error condition as
55 * determined by the application reporting the error.
57 * @return a string if available or null otherwise.
59 String getApplicationTag();
62 * Returns a string suitable for human display that describes the error
65 * @return a message string.
70 * Returns a string containing additional information to provide extended
71 * and/or implementation-specific debugging information.
73 * @return a string if available or null otherwise.
75 // FIXME: YANGTOOLS-765: this is wrong and needs to be modeled at data-api layer with YangErrorInfo
79 * Returns an exception cause.
81 * @return a Throwable if the error was triggered by exception, null otherwise.
86 * Returns the conceptual layer at which the error occurred.
88 * @return an {@link ErrorType} enum.
90 ErrorType getErrorType();