From 4a04177e98b4fb6a30a894973497594edda58330 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 19 Feb 2007 21:31:34 +0000 Subject: print backtraces git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@258 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- split-mailman-mails-and-discard-and-save | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'split-mailman-mails-and-discard-and-save') diff --git a/split-mailman-mails-and-discard-and-save b/split-mailman-mails-and-discard-and-save index c40627d..73413a1 100755 --- a/split-mailman-mails-and-discard-and-save +++ b/split-mailman-mails-and-discard-and-save @@ -330,11 +330,19 @@ Dir[MAILIN+"/new/*"].each do |filename| mail_error.header['X-List-Administrivia'] = 'yes' mail_error.header['Subject'] = "handling of #{filename} failed" mail_error.body = "Processing of #{filename} failed: #{e}\n" + - "Moved to #{newname}" + "Moved to #{newname}\n" + + "\n" + + "complete backtrace:\n"+ + e.backtrace.join("\n") store_in_maildir(OUTBOX, mail_error) rescue Exception => e2 STDERR.puts "Error when processing #{filename}: #{e}" STDERR.puts "During error handling we encountered a new problem: #{e2}" + STDERR.puts "backtrace of e:"+ + STDERR.puts e.backtrace.join("\n") + STDERR.puts + STDERR.puts "backtrace of e2:"+ + STDERR.puts e2.backtrace.join("\n") end end end -- cgit v1.2.3