X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Frbot%2Fdbhash.rb;h=dd61c7207161e90e8a92347e2d8245b480bca6d7;hb=346b8670f3470166f2d33efade6570b7578a9a48;hp=2f6f461fb6e46f20b5b710d75a68dc1b9bfd00f1;hpb=a9b32eae21a10254f67653c8ce92076300ba670b;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/lib/rbot/dbhash.rb b/lib/rbot/dbhash.rb index 2f6f461f..dd61c720 100644 --- a/lib/rbot/dbhash.rb +++ b/lib/rbot/dbhash.rb @@ -1,8 +1,17 @@ +#-- vim:sw=2:et +#++ +# +# :title: Berkeley DB interface + begin require 'bdb' +rescue LoadError + fatal "rbot couldn't load the bdb module, perhaps you need to install it? try: http://www.ruby-lang.org/en/raa-list.rhtml?name=bdb" rescue Exception => e - error "Got exception: #{e.pretty_inspect}" - error "rbot couldn't load the bdb module, perhaps you need to install it? try: http://www.ruby-lang.org/en/raa-list.rhtml?name=bdb" + fatal "rbot couldn't load the bdb module: #{e.pretty_inspect}" +end + +if not defined? BDB exit 2 end @@ -131,7 +140,7 @@ module Irc begin debug "DBTree: checkpointing ..." @@env.checkpoint - rescue Excpetion => e + rescue Exception => e debug "Failed: #{e.pretty_inspect}" end begin