# Ice::UnexpectedObjectException

## Overview

### local exception UnexpectedObjectException extends MarshalException

This exception is raised if the type of an unmarshaled Slice class instance does not match its expected type. This can happen if client and server are compiled with mismatched Slice definitions or if a class of the wrong type is passed as a parameter or return value using dynamic invocation. This exception can also be raised if ::IceStorm is used to send Slice class instances and an operation is subscribed to the wrong topic.

## Data Members

string type;

  The Slice type ID of the class instance that was unmarshaled.

string expectedType;

  The Slice type ID that was expected by the receiving operation.