Cleaner exit on exception

This commit is contained in:
Denis Knauf 2010-03-29 19:16:27 +02:00
parent d6c23172a9
commit cf83e98162
2 changed files with 10 additions and 1 deletions

View file

@ -12,4 +12,10 @@ opts[:server] = if ARGV[1]
end
opts[:server][1] = opts[:server][1].to_i
LogAn::Inc::Main.main *opts
logan = LogAn::Inc::Main.new *opts
begin
logan.main
rescue Object
logan.at_exit
raise $!
end