ROCommonCryptoException

Overview

Indicetes a Common Crypto API error. It is currently used by ROAESEncryptionEnvelope. Common Crypto execptions are also thrown in case of wrong decryption key used.

Location

 

errorCode  assign

Error code returned by the Common Crypto API

@property (assign) int32_t errorCode

exceptionName    (declared in ROException)

Return the exception name to be used to construct the class instance as NSException descendant. See NSException documentation for more details.

+ (NSString *) exceptionName

exceptionWithMessage:    (declared in ROException)

Constructs the excetion instance with the given text message (corresponds to reason of NSException).

+ (ROException *) exceptionWithMessage:(NSString *)aExceptionMessage

Parameters:

  • aExceptionMessage: A text string decribing the exception

exceptionWithMessage:direction:errorCode:

Creates an exception instance using all exception specific information.

+ (ROCommonCryptoException *) exceptionWithMessage:(NSString *)aMessage direction:(BOOL)aIsEncryption errorCode:(int32_t)aErrorCode

Parameters:

  • aMessage: Text message describing the error condition
  • aIsEncryption: Indicates which operation caused the error: YES is for encryption, NO is for decryption
  • aErrorCode: Error code returned by the Common Crypto API

fromServer  assign    (declared in ROException)

This flag is used to distinguish server side exceptions from client side ones. Set to YES for server side exceptions.

@property (assign) BOOL fromServer

initWithMessage:    (declared in ROException)

initializes a new ROException with the given error message.

- (id) initWithMessage:(NSString *)aExceptionMessage

Parameters:

  • aExceptionMessage: A text string decribing the exception

initWithMessage:direction:errorCode:

Initializes an exception instance using all exception specific information.

- (id) initWithMessage:(NSString *)aMessage direction:(BOOL)aIsEncryption errorCode:(int32_t)aErrorCode

Parameters:

  • aMessage: Text message describing the error condition
  • aIsEncryption: Indicates which operation caused the error: YES is for encryption, NO is for decryption
  • aErrorCode: Error code returned by the Common Crypto API

initWithMessage:fromServer:    (declared in ROException)

Initializes a new ROException with the given error message and optionally marks the exception as having been received from a server by setting the fromServer property.

- (id) initWithMessage:(NSString *)aExceptionMessage fromServer:(BOOL)aFromServer

Parameters:

  • aExceptionMessage: A text string decribing the exception
  • aFromServer: Set to YES for server side exceptions.

isEncryption  assign

Indicates which operation caused the error: YES is for encryption, NO is for decryption.

@property (assign) BOOL isEncryption

serverStackTrace  copy    (declared in ROException)

Used to store the stack trace of server exception. The availability of this information depends on the server platform.

@property (copy) NSString *serverStackTrace

 

errorCode  assign

Error code returned by the Common Crypto API

@property (assign) int32_t errorCode

fromServer  assign    (declared in ROException)

This flag is used to distinguish server side exceptions from client side ones. Set to YES for server side exceptions.

@property (assign) BOOL fromServer

isEncryption  assign

Indicates which operation caused the error: YES is for encryption, NO is for decryption.

@property (assign) BOOL isEncryption

serverStackTrace  copy    (declared in ROException)

Used to store the stack trace of server exception. The availability of this information depends on the server platform.

@property (copy) NSString *serverStackTrace

 

exceptionName    (declared in ROException)

Return the exception name to be used to construct the class instance as NSException descendant. See NSException documentation for more details.

+ (NSString *) exceptionName

exceptionWithMessage:    (declared in ROException)

Constructs the excetion instance with the given text message (corresponds to reason of NSException).

+ (ROException *) exceptionWithMessage:(NSString *)aExceptionMessage

Parameters:

  • aExceptionMessage: A text string decribing the exception

exceptionWithMessage:direction:errorCode:

Creates an exception instance using all exception specific information.

+ (ROCommonCryptoException *) exceptionWithMessage:(NSString *)aMessage direction:(BOOL)aIsEncryption errorCode:(int32_t)aErrorCode

Parameters:

  • aMessage: Text message describing the error condition
  • aIsEncryption: Indicates which operation caused the error: YES is for encryption, NO is for decryption
  • aErrorCode: Error code returned by the Common Crypto API

 

initWithMessage:    (declared in ROException)

initializes a new ROException with the given error message.

- (id) initWithMessage:(NSString *)aExceptionMessage

Parameters:

  • aExceptionMessage: A text string decribing the exception

initWithMessage:direction:errorCode:

Initializes an exception instance using all exception specific information.

- (id) initWithMessage:(NSString *)aMessage direction:(BOOL)aIsEncryption errorCode:(int32_t)aErrorCode

Parameters:

  • aMessage: Text message describing the error condition
  • aIsEncryption: Indicates which operation caused the error: YES is for encryption, NO is for decryption
  • aErrorCode: Error code returned by the Common Crypto API

initWithMessage:fromServer:    (declared in ROException)

Initializes a new ROException with the given error message and optionally marks the exception as having been received from a server by setting the fromServer property.

- (id) initWithMessage:(NSString *)aExceptionMessage fromServer:(BOOL)aFromServer

Parameters:

  • aExceptionMessage: A text string decribing the exception
  • aFromServer: Set to YES for server side exceptions.

See Also

ROAESEncryptionEnvelope ROAESEnvelopeUnexpectedLengthException