From ce93b07bb253df3c548c59bacc869839aa78bb4c Mon Sep 17 00:00:00 2001 From: mguetlein Date: Wed, 26 Jan 2011 15:54:05 +0100 Subject: add whitlisting concept for A&A, some minor modifications --- lib/error.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/error.rb') 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 -- cgit v1.2.3