public class StunException extends Exception
Modifier and Type | Field and Description |
---|---|
private int |
id
Identifies the exception.
|
static int |
ILLEGAL_ARGUMENT
Indicates that one or more of the passed arguments had invalid values.
|
static int |
ILLEGAL_STATE
Indicates that the attempted operation is not possible in the current
state of the object.
|
static int |
INTERNAL_ERROR
Indicates that an unexpected error has occurred..
|
static int |
NETWORK_ERROR
Indicates that an unexpected error has occurred..
|
private static long |
serialVersionUID
Serial version UID for this Serializable class.
|
static int |
TRANSACTION_ALREADY_ANSWERED
Thrown when trying to send responses through a transaction that have
already sent a response.
|
static int |
TRANSACTION_DOES_NOT_EXIST
Thrown when trying to send responses through a non-existent transaction
That may happen when a corresponding request has already been responded
to or when no such request has been received.
|
static int |
UNKNOWN_ERROR
Means that the the reason that caused the exception was unclear.
|
Constructor and Description |
---|
StunException()
Creates a StunException.
|
StunException(int id)
Creates a StunException setting id as its identifier.
|
StunException(int id,
String message)
Creates a StunException, setting an error message and an error id.
|
StunException(int id,
String message,
Throwable cause)
Creates a StunException, setting an error message an error id and a
cause.
|
StunException(String message)
Creates a StunException, setting an error message.
|
StunException(String message,
Throwable cause)
Creates a StunException, setting an error message and a cause object.
|
StunException(Throwable cause)
Creates an exception, setting the Throwable object, that caused it.
|
Modifier and Type | Method and Description |
---|---|
int |
getID()
Returns this exception's identifier.
|
void |
setID(int id)
Sets the identifier of the error that caused the exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
private static final long serialVersionUID
public static final int UNKNOWN_ERROR
public static final int ILLEGAL_STATE
public static final int ILLEGAL_ARGUMENT
public static final int INTERNAL_ERROR
public static final int TRANSACTION_DOES_NOT_EXIST
public static final int NETWORK_ERROR
public static final int TRANSACTION_ALREADY_ANSWERED
private int id
public StunException()
public StunException(int id)
id
- an error IDpublic StunException(String message)
message
- an error message.public StunException(int id, String message)
message
- an error message.id
- an error id.public StunException(int id, String message, Throwable cause)
id
- an error id.message
- an error message.cause
- the error that caused this exception.public StunException(String message, Throwable cause)
message
- an error message.cause
- the error object that caused this exception.public StunException(Throwable cause)
cause
- the error that caused this exception.Copyright © 2018. All rights reserved.