Callback for errors on a session object. It is not recommended to throw an exception inside an error handler, as the exception will be caught, logged, and ignored by Realm. Instead, it is better to manually catch all exceptions and manually handle these exceptions.