Is "exception" class built in? if so, extendable by users?
There is a builtin exception class that can be inherited at C-level api.
For now it is also inheritable inside PHP scripts but we may have
two different types for internal and userland exceptions respectively
or add another getter method to query that information.
if not, how does getMessage() know where to find the error - especially if this error is produced by an extension.
There is a dynamic property $message that can be set inside the
constructor. Additional there are $code/getcode(), $file/getfile()
and $line/getline(). However these properties are dynamically created
upon instantiating when an internal exception is thrown or the
exception::exception() constructor is called. So when inheriting
the exception class simply ensure the base class constructor will
be called.
In the current implementation the above are not defined when inheriting
the exception base class. But expect this to change so that these
properties are declared in the base class as protected.
marcus