Replaced the default error handler.

Stack traces are now logged, but not shown to the user.