Class: ModRubyExceptionPrinter
- Inherits:
-
CGIExceptionPrinter
- Object
- CGIExceptionPrinter
- ModRubyExceptionPrinter
- Defined in:
- lib/cgi_exception.rb
Instance Attribute Summary
Attributes inherited from CGIExceptionPrinter
Instance Method Summary collapse
- #print_exception(ex) ⇒ Object
-
#print_header ⇒ Object
print HTTP header (for mod_ruby).
Methods inherited from CGIExceptionPrinter
#escape_html, #handle, #initialize
Constructor Details
This class inherits a constructor from CGIExceptionPrinter
Instance Method Details
#print_exception(ex) ⇒ Object
70 71 72 73 |
# File 'lib/cgi_exception.rb', line 70 def print_exception(ex) super $stderr.write "#{ex.backtrace[0]}: #{ex.} (#{ex.class.name})\n" end |
#print_header ⇒ Object
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 |