Exceptions need to be reflected so that when a language like Python calls a reflected function, any exception thrown on the C++ side can be caught and re-thrown on the Python side. Exception classes need to be reflected to give Python access to information about what error occurred.
We want to support the conventional approach of throwing C++ exceptions by value and catching by reference. Unfortunately it is not possible to throw an exception that implements IObject, and catch it using a ptr<IObject> - because that would need special support from the C++ compiler.
To allow for reflection of exceptions, we require exception classes to inherit from the following base exception class.
struct IReflectedException : public IException
{
virtual const ReflectedClass& GetReflectedClass() const = 0;
};