ROUnexpectedObjectInStreamException

Overview

This exception happens when deserializing complex types (i.e. arrays and structures) but the actual deserialized class does not match the expected class. This can happen when the local service interface code does not match the actual RODL file on the server. You need to generate the proper code with the rodl2objc utility.

Location

 

exceptionName    (declared in ROException)

+ (nonnull NSString *) exceptionName

exceptionWithMessage:    (declared in ROException)

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

Parameters:

  • aExceptionMessage:

exceptionWithObjectClass:

+ (nonnull ROUnexpectedObjectInStreamException *) exceptionWithObjectClass:(nonnull Class)aClass

Parameters:

  • aClass:

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)

- (nullable instancetype) initWithMessage:(nonnull NSString *)aExceptionMessage

Parameters:

  • aExceptionMessage:

initWithMessage:fromServer:    (declared in ROException)

- (nullable instancetype) initWithMessage:(nonnull NSString *)aExceptionMessage fromServer:(BOOL)aFromServer

Parameters:

  • aExceptionMessage:
  • aFromServer:

initWithObjectClass:

- (nonnull instancetype) initWithObjectClass:(nonnull Class)aClass

Parameters:

  • aClass:

objectClass  assign

The class of the object that was deserialized from the stream

@property (assign) Class objectClass

serverStackTrace  copy    (declared in ROException)

@property (copy) nonnull NSString *serverStackTrace

 

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

objectClass  assign

The class of the object that was deserialized from the stream

@property (assign) Class objectClass

serverStackTrace  copy    (declared in ROException)

@property (copy) nonnull NSString *serverStackTrace

 

exceptionName    (declared in ROException)

+ (nonnull NSString *) exceptionName

exceptionWithMessage:    (declared in ROException)

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

Parameters:

  • aExceptionMessage:

exceptionWithObjectClass:

+ (nonnull ROUnexpectedObjectInStreamException *) exceptionWithObjectClass:(nonnull Class)aClass

Parameters:

  • aClass:

 

initWithMessage:    (declared in ROException)

- (nullable instancetype) initWithMessage:(nonnull NSString *)aExceptionMessage

Parameters:

  • aExceptionMessage:

initWithMessage:fromServer:    (declared in ROException)

- (nullable instancetype) initWithMessage:(nonnull NSString *)aExceptionMessage fromServer:(BOOL)aFromServer

Parameters:

  • aExceptionMessage:
  • aFromServer:

initWithObjectClass:

- (nonnull instancetype) initWithObjectClass:(nonnull Class)aClass

Parameters:

  • aClass: