Class: ModRubyExceptionPrinter

Inherits:
CGIExceptionPrinter show all
Defined in:
lib/cgi_exception.rb

Instance Attribute Summary

Attributes inherited from CGIExceptionPrinter

#out, #skip_header

Instance Method Summary collapse

Methods inherited from CGIExceptionPrinter

#escape_html, #handle, #initialize

Constructor Details

This class inherits a constructor from CGIExceptionPrinter

Instance Method Details



70
71
72
73
# File 'lib/cgi_exception.rb', line 70

def print_exception(ex)
  super
  $stderr.write "#{ex.backtrace[0]}: #{ex.message} (#{ex.class.name})\n"
end

print HTTP header (for mod_ruby)



61
62
63
64
65
66
67
68
# File 'lib/cgi_exception.rb', line 61

def print_header
  request = Apache::request
  request.status = 500
  request.status_line = '500 Internal Error'
  request.content_type = 'text/html'
  request.headers_out['X-CGI-Exception'] = '0.3.0'
  request.send_http_header
end