Enabled extended result codes.

With the change to exceptions to make error codes accessible, it would be nice to have the extended error code available, so the caller gets as much information as possible.