* wrap BDB::Fatal classes for abstract trapping
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 27 Sep 2010 11:52:14 +0000 (13:52 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 27 Sep 2010 11:52:14 +0000 (13:52 +0200)
commit2ed8235cdb9e92b0bc46ee97ddbf4c4a1f70c6d8
tree03c50cb18860c3ecb41d207a14c1d412b7b2f39b
parent284bcbf4b29184717cd2e0986d4c2007ee6a930c
* wrap BDB::Fatal classes for abstract trapping

When using a DB backend different from BDB, the BDB constant may not be
defined, causing a NameError during error trapping in the main loop. Fix
this by defining our own DBFatal error that maps to BDB::Fatal in the
BDB case and is defined as an (unused) Exception for TokyoCabinet.
lib/rbot/ircbot.rb
lib/rbot/registry/bdb.rb
lib/rbot/registry/tc.rb