Exception handling for www::mediawiki::client
use WWW::Mediawiki::Client::Exception; use Data::Dumper; # throw eval { WWW::Mediawiki::Client::LoginException->throw( error => 'Something bad happened', res => $res, cookie_jar => $cookie_jar, ); }; # catch if (UNIVERSAL::isa($@, 'WWW::Mediawiki::Client::LoginException') { print STDERR $@->error; print Dumper($@->res); }
A base class for WWW::Mediawiki::Client exceptions.
Indicates a problem with the \s-1URL\s0 with which we to the Mediawiki server.
Indicates a problem with the provided authentication information
Indicates that login failed for an unknown reason
Fields:
For the apache response object returned by the attempt to log in.
For the cookie jar which was returned by the attempt to log in.
Something went wrong saving or loading the cookie jar
Something went wrong saving or loading a file
The file which we attempted to operate on is not a .wiki file
The file which we attempted to operate on is not a .wiki file
There is a problem with the commit message
Something went wrong while committing a change
There is no such page, either here or on the server
The page on the server has changed since the local file was last updated
An attempt was made to commit a file containing conflicts
The configuration file cannot be parsed.
Something went wrong fetching the server page.
Throws:
The apache response object which was returned in the attempt to fetch the page.
Client code tried to set a read-only field.
Exception::Class
Author
Inspired the improvement in error handling and reporting.
Copyright (c) 2004 Mark Jaroski.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.