bin/sup in sup-0.0.7 vs bin/sup in sup-0.0.8

- old
+ new

@@ -81,10 +81,12 @@ c.add :to_me_color, Ncurses::COLOR_GREEN, Ncurses::COLOR_BLACK c.add :starred_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK, Ncurses::A_BOLD c.add :starred_patina_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_GREEN, Ncurses::A_BOLD + c.add :alternate_starred_patina_color, Ncurses::COLOR_YELLOW, + Ncurses::COLOR_BLUE, Ncurses::A_BOLD c.add :snippet_color, Ncurses::COLOR_CYAN, Ncurses::COLOR_BLACK c.add :option_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK c.add :tagged_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK, Ncurses::A_BOLD c.add :draft_notification_color, Ncurses::COLOR_RED, Ncurses::COLOR_BLACK, @@ -96,20 +98,28 @@ log "initializing mail index buffer" imode = InboxMode.new ibuf = bm.spawn "inbox", imode - log "ready for (inter)action!" + log "ready for interaction!" Logger.make_buf bm.draw_screen + + begin + Index.usual_sources.each { |s| s.check } + rescue SourceError + # do nothing! we'll report it at the next step + end + Redwood::report_broken_sources + Index.usual_sources.each do |s| reporting_thread do begin s.connect rescue SourceError => e - Redwood::log "Fatal error loading from #{s}: #{e.message}" + Redwood::log "fatal error loading from #{s}: #{e.message}" end end if s.respond_to? :connect end imode.load_threads :num => ibuf.content_height, :when_done => lambda { reporting_thread { sleep 1; PollManager.poll } } @@ -195,15 +205,14 @@ rescue Exception => e $exception ||= e ensure Redwood::finish stop_cursing - - # don't ask me why, but sometimes it's necessary to print something - # to stderr at this point or the exception doesn't get printed. - # doesn't get printed. WHY? - - $stderr.puts " " + if $exception + Redwood::log "oh crap, an exception" + else + Redwood::log "good night, sweet prince!" + end end Index.save unless $exception # TODO: think about this if $exception