Method: BlackStack::Strings::Encoding.encode_exception
- Defined in:
- lib/functions.rb
.encode_exception(e, include_backtrace = true) ⇒ Object
Generates a description string from an exception object. Eescapes the string to be shown into an HTML screen. Makes it compatible with UTF-8. More details here: bitbucket.org/leandro_sardi/blackstack/issues/961
359 360 361 362 363 364 365 366 367 |
# File 'lib/functions.rb', line 359 def self.encode_exception(e, include_backtrace=true) ret = encode_html(e.to_s) if (include_backtrace == true) e.backtrace.each { |s| ret += "<br/>" + encode_html(s) } # e.backtrace.each end # if ret end |