Write exception to error page.