diff options
Diffstat (limited to 'lib/error.rb')
-rw-r--r-- | lib/error.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/error.rb b/lib/error.rb index e5c460d..8c666f3 100644 --- a/lib/error.rb +++ b/lib/error.rb @@ -39,7 +39,7 @@ module OpenTox @actor = actor @errorCause = error.errorCause if error.errorCause @rest_params = error.rest_params if error.is_a?(OpenTox::RestCallError) and error.rest_params - @backtrace = error.backtrace.join("\n") if CONFIG[:backtrace] + @backtrace = error.backtrace.short_backtrace if CONFIG[:backtrace] end # overwrite sorting to make easier readable @@ -72,4 +72,15 @@ module OpenTox s.to_rdfxml end end +end + +class Array + def short_backtrace + short = [] + each do |c| + break if c =~ /sinatra\/base/ + short << c + end + short.join("\n") + end end
\ No newline at end of file |