FMLiveSwitchError Class Reference

An error. More...

Instance Methods

(FMLiveSwitchErrorCode) - code
 Gets the code. More...
 
(int) - codeValue
 Gets the code. More...
 
(NSString *) - description
 Returns the string representation of this error. More...
 
(FMLiveSwitchErrorCode) - errorCode
 Gets the code. More...
 
(NSException *) - exception
 Gets the exception. More...
 
(NSString *) - getDescription
 Gets the description for this FMLiveSwitchError. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchError class. More...
 
(instancetype) - initWithCode:exception:
 Initializes a new instance of the FMLiveSwitchError class. More...
 
(instancetype) - initWithCode:message:
 Initializes a new instance of the FMLiveSwitchError class. More...
 
(NSString *) - message
 Gets the message. More...
 
(void) - setCode:
 Sets the code. More...
 
(void) - setCodeValue:
 Sets the code. More...
 
(void) - setErrorCode:
 Sets the code. More...
 
(void) - setException:
 Sets the exception. More...
 
(void) - setMessage:
 Sets the message. More...
 
(NSString *) - toJson
 Serializes this instance to JSON. More...
 

Class Methods

(FMLiveSwitchError *) + error
 Initializes a new instance of the FMLiveSwitchError class. More...
 
(FMLiveSwitchError *) + errorWithCode:exception:
 Initializes a new instance of the FMLiveSwitchError class. More...
 
(FMLiveSwitchError *) + errorWithCode:message:
 Initializes a new instance of the FMLiveSwitchError class. More...
 
(FMLiveSwitchError *) + fromJsonWithErrorJson:
 Deserializes an instance from JSON. More...
 
(NSString *) + toJsonWithError:
 Serializes an instance to JSON. More...
 

Detailed Description

An error.

Method Documentation

◆ code

- (FMLiveSwitchErrorCode) code

Gets the code.

◆ codeValue

- (int) codeValue

Gets the code.

◆ description

- (NSString*) description

Returns the string representation of this error.

◆ error

+ (FMLiveSwitchError*) error

Initializes a new instance of the FMLiveSwitchError class.

◆ errorCode

- (FMLiveSwitchErrorCode) errorCode

Gets the code.

Deprecated:
Use Code instead.

◆ errorWithCode:exception:

+ (FMLiveSwitchError*) errorWithCode: (FMLiveSwitchErrorCode)  code
exception: (NSException *)  exception 

Initializes a new instance of the FMLiveSwitchError class.

Parameters
codeThe code.
exceptionThe exception.

◆ errorWithCode:message:

+ (FMLiveSwitchError*) errorWithCode: (FMLiveSwitchErrorCode)  code
message: (NSString *)  message 

Initializes a new instance of the FMLiveSwitchError class.

Parameters
codeThe code.
messageThe message.

Implemented in FMLiveSwitchStunError.

◆ exception

- (NSException*) exception

Gets the exception.

◆ fromJsonWithErrorJson:

+ (FMLiveSwitchError*) fromJsonWithErrorJson: (NSString *)  errorJson

Deserializes an instance from JSON.

Parameters
errorJsonThe JSON to deserialize.
Returns
The deserialized error.

◆ getDescription

◆ init

◆ initWithCode:exception:

- (instancetype) initWithCode: (FMLiveSwitchErrorCode)  code
exception: (NSException *)  exception 

Initializes a new instance of the FMLiveSwitchError class.

Parameters
codeThe code.
exceptionThe exception.

◆ initWithCode:message:

- (instancetype) initWithCode: (FMLiveSwitchErrorCode)  code
message: (NSString *)  message 

Initializes a new instance of the FMLiveSwitchError class.

Parameters
codeThe code.
messageThe message.

Implemented in FMLiveSwitchStunError.

◆ message

- (NSString*) message

Gets the message.

◆ setCode:

- (void) setCode: (FMLiveSwitchErrorCode)  value

Sets the code.

◆ setCodeValue:

- (void) setCodeValue: (int)  value

Sets the code.

◆ setErrorCode:

- (void) setErrorCode: (FMLiveSwitchErrorCode)  value

Sets the code.

Deprecated:
Use Code instead.

◆ setException:

- (void) setException: (NSException *)  value

Sets the exception.

◆ setMessage:

- (void) setMessage: (NSString *)  value

Sets the message.

◆ toJson

- (NSString*) toJson

Serializes this instance to JSON.

Returns
The serialized JSON.

◆ toJsonWithError:

+ (NSString*) toJsonWithError: (FMLiveSwitchError *)  error

Serializes an instance to JSON.

Parameters
errorThe error.
Returns
The serialized JSON.