Skip to content
Browse files

Exception::Class-based exceptions for AnyEvent::CouchDB

  • Loading branch information...
1 parent f76b256 commit de3dff9dbaea19a0edc8fbe9b937f006fdba8489 @beppu committed Mar 24, 2011
Showing with 17 additions and 0 deletions.
  1. +17 −0 lib/AnyEvent/CouchDB/Exceptions.pm
View
17 lib/AnyEvent/CouchDB/Exceptions.pm
@@ -0,0 +1,17 @@
+package AnyEvent::CouchDB::Exceptions;
+
+use Exception::Class (
+ 'AnyEvent::CouchDB::Exception' => {
+ fields => [ 'headers', 'body' ],
+ },
+ 'AnyEvent::CouchDB::Exception::JSONError' => {
+ isa => 'AnyEvent::CouchDB::Exception'
+ },
+ 'AnyEvent::CouchDB::Exception::BadRequest' => {
+ isa => 'AnyEvent::CouchDB::Exception'
+ },
+);
+
+AnyEvent::CouchDB::Exception->Trace($ENV{ANYEVENT_COUCHDB_DEBUG});
+
+1;

0 comments on commit de3dff9

Please sign in to comment.
Something went wrong with that request. Please try again.