Added error/exception handlers.