DOKK / manpages / debian 12 / libwww-mediawiki-client-perl / WWW::Mediawiki::Client::Exceptions.3pm.en
WWW::Mediawiki::Client::Exceptions(3pm) User Contributed Perl Documentation WWW::Mediawiki::Client::Exceptions(3pm)

WWW::Mediawiki::Client::Exception - 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 URL 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.

2021-12-26 perl v5.32.1