Simple error and exception handler.