Exception: Exception
- Defined in:
- lib/web/connection.rb
Instance Method Summary
collapse
Instance Method Details
#rbw_backtrace ⇒ Object
14
15
16
17
18
|
# File 'lib/web/connection.rb', line 14
def rbw_backtrace
self.backtrace
end
|
#rbw_backtrace_html ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/web/connection.rb', line 20
def rbw_backtrace_html
trace = self.rbw_backtrace
trace.unshift(self.to_s)
msg = <<-STYLE
<style type="text/css">
.columnHead {
background-color:CCCDDD;
text-align:center;
font-weight:bold;
}
.info {
text-align:center;
}
.info_row:hover{
background-color:F8FF80;
}
</style>
STYLE
msg += "<p><table onMouseover=\"changeto(event, '#F8FF80')\" onMouseout=\"changeback(event, '#eeeeff')\">\n"
msg += "<tr><td class='columnHead'>File</td><td class='columnHead'> Line </td><td class='columnHead'>Method</td></tr>\n"
trace.each do |level|
level = Web::parse_trace(level)
msg += "<tr class='info_row'>\n"
level.each{ |column| msg += "<td class='info'>" + (column || '') + "</td>\n" }
msg += "</tr>\n\n"
end
msg += "</table>"
msg
end
|
8
9
10
11
12
|
# File 'lib/web/connection.rb', line 8
def rbw_html
msg = "<b style='font-size:20px'>" + Web::html_encode(self.to_s).gsub(/\n/,"<br>") + "</b><br>"
msg += Time::now().to_s
msg
end
|
54
55
56
57
58
59
60
|
# File 'lib/web/connection.rb', line 54
def rbw_to_s
str = self.class.to_s + ": " + self.to_s + "\n";
str += self.rbw_backtrace.collect do |line|
" " + line.chomp
end.join("\n")
str
end
|