lib/sup.rb in sup-0.0.6 vs lib/sup.rb in sup-0.0.7

- old
+ new

@@ -11,17 +11,17 @@ raise "wrong id called on #{self.inspect}" end end module Redwood - VERSION = "0.0.6" + VERSION = "0.0.7" BASE_DIR = ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup") CONFIG_FN = File.join(BASE_DIR, "config.yaml") SOURCE_FN = File.join(BASE_DIR, "sources.yaml") LABEL_FN = File.join(BASE_DIR, "labels.txt") - PERSON_FN = File.join(BASE_DIR, "people.txt") + PERSON_FN = File.join(BASE_DIR, "people.txt") CONTACT_FN = File.join(BASE_DIR, "contacts.txt") DRAFT_DIR = File.join(BASE_DIR, "drafts") SENT_FN = File.join(BASE_DIR, "sent.mbox") YAML_DOMAIN = "masanjin.net" @@ -32,9 +32,13 @@ def reporting_thread ::Thread.new do begin yield rescue Exception => e + File.open("sup-exception-log.txt", "w") do |f| + f.puts "--- #{e.class.name} at #{Time.now}" + f.puts e.message, e.backtrace + end $exception ||= e raise end end end