summaryrefslogtreecommitdiff
path: root/lib/Travel/Routing/DE
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-06-28 19:45:13 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-06-28 19:45:13 +0200
commit7615088320ac1987ee7eaeeef6c81e68f3c549c0 (patch)
tree4c1754422aab1b7e7f19a2892730f65e9972595f /lib/Travel/Routing/DE
parentc1c3afa66bf6e2ad0b1a1731c057f10468605468 (diff)
VRR.pm: Add Travel::Routing::DE::VRR::Exception base class
Diffstat (limited to 'lib/Travel/Routing/DE')
-rw-r--r--lib/Travel/Routing/DE/VRR.pm19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/Travel/Routing/DE/VRR.pm b/lib/Travel/Routing/DE/VRR.pm
index 62d6a3e..d486a6e 100644
--- a/lib/Travel/Routing/DE/VRR.pm
+++ b/lib/Travel/Routing/DE/VRR.pm
@@ -9,22 +9,30 @@ use LWP::UserAgent;
use XML::LibXML;
use Exception::Class (
+ 'Travel::Routing::DE::VRR::Exception',
'Travel::Routing::DE::VRR::Exception::Setup' => {
+ isa => 'Travel::Routing::DE::VRR::Exception',
description => 'invalid argument on setup',
fields => [ 'option', 'have', 'want' ],
},
'Travel::Routing::DE::VRR::Exception::Net' => {
+ isa => 'Travel::Routing::DE::VRR::Exception',
description => 'could not submit POST request',
fields => 'http_response',
},
- 'Travel::Routing::DE::VRR::Exception::NoData' =>
- { description => 'got no data to parse', },
+ 'Travel::Routing::DE::VRR::Exception::NoData' => {
+ isa => 'Travel::Routing::DE::VRR::Exception',
+ description => 'got no data to parse',
+ },
'Travel::Routing::DE::VRR::Exception::Ambiguous' => {
+ isa => 'Travel::Routing::DE::VRR::Exception',
description => 'ambiguous input',
fields => [ 'post_key', 'possibilities' ],
},
- 'Travel::Routing::DE::VRR::Exception::NoConnections' =>
- { description => 'got no connections', },
+ 'Travel::Routing::DE::VRR::Exception::NoConnections' => {
+ isa => 'Travel::Routing::DE::VRR::Exception',
+ description => 'got no connections',
+ },
);
our $VERSION = '1.3';
@@ -759,6 +767,9 @@ The following methods act like the arguments to B<new>. See there.
=head1 DIAGNOSTICS
+When encountering an error, Travel::Routing::DE::VRR returns a
+Travel::Routing::DE::VRR::Exception object.
+
Dies with a backtrace when anything goes wrong.
=head1 DEPENDENCIES