fm.liveswitch.Error Class Reference

An error. More...

Public Member Functions

 Error ()
 Initializes a new instance of the fm.liveswitch.Error class. More...
 
 Error (fm.liveswitch.ErrorCode code, java.lang.Exception exception)
 Initializes a new instance of the fm.liveswitch.Error class. More...
 
 Error (fm.liveswitch.ErrorCode code, String message)
 Initializes a new instance of the fm.liveswitch.Error class. More...
 
fm.liveswitch.ErrorCode getCode ()
 Gets the code. More...
 
int getCodeValue ()
 Gets the code. More...
 
String getDescription ()
 Gets the description for this fm.liveswitch.Error. More...
 
fm.liveswitch.ErrorCode getErrorCode ()
 Gets the code. More...
 
java.lang.Exception getException ()
 Gets the exception. More...
 
String getMessage ()
 Gets the message. More...
 
void setCode (fm.liveswitch.ErrorCode value)
 Sets the code. More...
 
void setCodeValue (int value)
 Sets the code. More...
 
void setErrorCode (fm.liveswitch.ErrorCode value)
 Sets the code. More...
 
void setException (java.lang.Exception value)
 Sets the exception. More...
 
void setMessage (String value)
 Sets the message. More...
 
String toJson ()
 Serializes this instance to JSON. More...
 
String toString ()
 Returns the string representation of this error. More...
 

Static Public Member Functions

static fm.liveswitch.Error fromJson (String errorJson)
 Deserializes an instance from JSON. More...
 
static String toJson (final fm.liveswitch.Error error)
 Serializes an instance to JSON. More...
 

Detailed Description

An error.

Constructor & Destructor Documentation

◆ Error() [1/3]

fm.liveswitch.Error.Error ( )

Initializes a new instance of the fm.liveswitch.Error class.

◆ Error() [2/3]

fm.liveswitch.Error.Error ( fm.liveswitch.ErrorCode  code,
java.lang.Exception  exception 
)

Initializes a new instance of the fm.liveswitch.Error class.

Parameters
codeThe code.
exceptionThe exception.

◆ Error() [3/3]

fm.liveswitch.Error.Error ( fm.liveswitch.ErrorCode  code,
String  message 
)

Initializes a new instance of the fm.liveswitch.Error class.

Parameters
codeThe code.
messageThe message.

Reimplemented in fm.liveswitch.stun.Error.

Member Function Documentation

◆ fromJson()

static fm.liveswitch.Error fm.liveswitch.Error.fromJson ( String  errorJson)
static

Deserializes an instance from JSON.

Parameters
errorJsonThe JSON to deserialize.
Returns
The deserialized error.

◆ getCode()

fm.liveswitch.ErrorCode fm.liveswitch.Error.getCode ( )

Gets the code.

◆ getCodeValue()

int fm.liveswitch.Error.getCodeValue ( )

Gets the code.

◆ getDescription()

◆ getErrorCode()

fm.liveswitch.ErrorCode fm.liveswitch.Error.getErrorCode ( )

Gets the code.

Deprecated:
Use Code instead.

◆ getException()

java.lang.Exception fm.liveswitch.Error.getException ( )

Gets the exception.

◆ getMessage()

String fm.liveswitch.Error.getMessage ( )

Gets the message.

◆ setCode()

void fm.liveswitch.Error.setCode ( fm.liveswitch.ErrorCode  value)

Sets the code.

◆ setCodeValue()

void fm.liveswitch.Error.setCodeValue ( int  value)

Sets the code.

◆ setErrorCode()

void fm.liveswitch.Error.setErrorCode ( fm.liveswitch.ErrorCode  value)

Sets the code.

Deprecated:
Use Code instead.

◆ setException()

void fm.liveswitch.Error.setException ( java.lang.Exception  value)

Sets the exception.

◆ setMessage()

void fm.liveswitch.Error.setMessage ( String  value)

Sets the message.

◆ toJson() [1/2]

String fm.liveswitch.Error.toJson ( )

Serializes this instance to JSON.

Returns
The serialized JSON.

◆ toJson() [2/2]

static String fm.liveswitch.Error.toJson ( final fm.liveswitch.Error  error)
static

Serializes an instance to JSON.

Parameters
errorThe error.
Returns
The serialized JSON.

◆ toString()

String fm.liveswitch.Error.toString ( )

Returns the string representation of this error.