Fixed the ErrorHandler failing when no previous native error handler is set

Added documentation.