We have a method to enable throwing exceptions on error but it does not work in all cases. For example here, the old error handling is still used.
Maybe we should convert setting $this->error to throwing an exception on failure everywhere internally, catch it at the top level in the public functions, and rethrow it if enable_exceptions is true. And deprecate the enable_exceptions method.
For 2.0, we could then remove the try-catch statements and the enable_exceptions method.
cc @Art4