Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 5d78c18979
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (23 sloc) 0.505 kB
module ErrorHelper
def rescue_msg( e )
msg = "\n\nnil exception (unknown error)\n\n\n"
unless e.nil?
# format an error message
msg = "\n\n#{e.class} (#{e.message}):\n " +
e.backtrace.join("\n ") +
"\n\n"
end
msg
end
def rescue_alert( msg )
# stderr
$stderr.puts msg
# logger
Base.logger.error( msg )
end
def rescue_msg_and_alert( e )
m = rescue_msg( e )
rescue_alert( m )
m
end
end
Jump to Line
Something went wrong with that request. Please try again.