diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-06-20 12:12:23 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-06-20 12:12:23 +0200 |
commit | b0364ee726dc5348fdb394f52660c0abf3c61756 (patch) | |
tree | 9512f6c7a264e5619ace62470bd084781bb05fbd /lib | |
parent | be3cd762fbd809c789c3783f866c83b1124f95dd (diff) |
dbhash.rb: slightly rework errors for failing to load bdb
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/dbhash.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/rbot/dbhash.rb b/lib/rbot/dbhash.rb index 3220fb7f..ce333109 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' + require 'bdb-not' +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 |