J
Jan Roslind
I am trying to implement report to a bug management system in rails.
Want to report error stack, local and instance variables for every
method and has come to following "global" rescue clause:
def xxx
begin
...
...
rescue => e
SomeClass.some_method binding, self # appends variable info to a
class variable
raise
end
end # xxx
The problem it is not wery DRY to repeat the above rescue for every
method in my application.
Have tried with:
def xxxx
begin
...
...
load 'global_rescue.rb' # rescue => e ; SomeClass.some_method binding,
self ; raise
end # xxx
without success. No errors message but also no capture of variable
information for xxx. Can't use include. Works only for models :=(
Any suggestions?
Want to report error stack, local and instance variables for every
method and has come to following "global" rescue clause:
def xxx
begin
...
...
rescue => e
SomeClass.some_method binding, self # appends variable info to a
class variable
raise
end
end # xxx
The problem it is not wery DRY to repeat the above rescue for every
method in my application.
Have tried with:
def xxxx
begin
...
...
load 'global_rescue.rb' # rescue => e ; SomeClass.some_method binding,
self ; raise
end # xxx
without success. No errors message but also no capture of variable
information for xxx. Can't use include. Works only for models :=(
Any suggestions?