C0 code coverage information

Generated on Sat Feb 02 17:44:25 +0100 2008 with rcov 0.8.1.2


Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
Name Total lines Lines of code Total coverage Code coverage
lib/ramaze/controller/error.rb 41 24
58.5% 
50.0% 
 1 #          Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com
 2 # All files in this distribution are subject to the terms of the Ruby license.
 3 
 4 module Ramaze
 5   class Controller
 6     # The default error-page handler. you can overwrite this method
 7     # in your controller and create your own error-template for use.
 8     #
 9     # Error-pages can be in whatever the templating-engine of your controller
10     # is set to.
11     #   Ramaze::Dispatcher::Error.current
12     # holds the exception thrown.
13 
14     def error
15       error = Ramaze::Dispatcher::Error.current
16       title = error.message
17 
18       unless Action.current.template
19         response['Content-Type'] = 'text/plain'
20         return [title, "", error.backtrace].flatten.join("\n")
21       end
22 
23       backtrace_size = Ramaze::Global.backtrace_size
24       @backtrace = error.backtrace[0..20].map do |line|
25         file, lineno, meth = *Ramaze.parse_backtrace(line)
26         lines = Ramaze.caller_lines(file, lineno, backtrace_size)
27 
28         [ lines, lines.object_id.abs, file, lineno, meth ]
29       end
30 
31       # for backwards-compat with old error.zmr
32       @colors = [255] * @backtrace.size
33 
34       @title = CGI.escapeHTML(title)
35       @editor = (ENV['EDITOR'] || 'vim')
36       title
37     rescue Object => ex
38       Inform.error(ex)
39     end
40   end
41 end

Generated using the rcov code coverage analysis tool for Ruby version 0.8.1.2.

Valid XHTML 1.0! Valid CSS!