From 4df1c605a2095bb17fc3b41fcc321ac781b57970 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Tue, 16 Apr 2013 17:52:39 +0200 Subject: [PATCH] WPSTools : Do not output the backtrace of the main script --- wpstools.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wpstools.rb b/wpstools.rb index 6fb7d627..3b744da6 100755 --- a/wpstools.rb +++ b/wpstools.rb @@ -32,7 +32,11 @@ begin exit(0) rescue => e puts "[ERROR] #{e.message}" - puts 'Trace :' - puts e.backtrace.join("\n") + + unless e.backtrace[0] =~ /main/ + puts 'Trace :' + puts e.backtrace.join("\n") + end + exit(1) end