wmiirc-rumai

git clone git://oldgit.suckless.org/wmiirc-rumai/
Log | Files | Refs | README | LICENSE

commit 8a52c14eba3ce745c89f5e51ddc1e6c3893000f8
parent 2bdc56ca02ff43f3bcbd2386d82759b51daa3d0b
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date:   Tue, 19 Sep 2006 10:40:20 -0700

[project @ 93e127fd6a6ce3aaeb15e3221cd96a99a91b7147]

[project @ 108]
no longer retry from StandardError. user is given xmessage & terminal to rescue self

Diffstat:
wmiirc | 15++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/wmiirc b/wmiirc @@ -23,6 +23,16 @@ require 'logger' LOG = Logger.new(__FILE__ + '.log', 5) +# Provide a means by which the user can rescue themselves. +def throw_life_saver aError + system 'xterm &' + + IO.popen('xmessage -file -', 'w') do |f| + f.puts aError.inspect, aError.backtrace + end +end + + LOG.info "starting" begin @@ -30,12 +40,11 @@ begin rescue => e LOG.error e - - LOG.info "recovering from above error" - retry + throw_life_saver e rescue Exception => e LOG.fatal e + throw_life_saver e end LOG.info "stopping"