WWW::M...ptions(3pm)
β¨ WWW::Mediawiki::Client::Exception π
okay so bestie, welcome to the exception-handling page for WWW::Mediawiki::Client β from the User Contributed Perl Documentation collection, no less. This is the drama-central page where all the "something went wrong" classes live. π«Ά
πΈ NAME πΈ
WWW::Mediawiki::Client::Exception β exception handling for WWW::Mediawiki::Client, fr fr. It's giving "everything that can go wrong, and the little class names we give it." π
π SYNOPSIS π
Here's the whole vibe, verbatim, no edits, periodt:
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);
}
so you throw inside an eval, and then you catch by vibe-checking $@ with UNIVERSAL::isa. iconic behaviour honestly. β¨
π¦ DESCRIPTION π¦
It's the base class for WWW::Mediawiki::Client exceptions. That's the whole description. Short. Sweet. Main character energy. π
π SUBCLASSES π
buckle up bestie, there's a lot of them and honestly every single one is valid π
π WWW::Mediawiki::Client::URLConstructionException
Indicates a problem with the URL with which we to the Mediawiki server. (yes that sentence is shaped like that, we're relaying it exactly, don't @ me π)
π WWW::Mediawiki::Client::AuthException
Indicates a problem with the provided authentication information.
π WWW::Mediawiki::Client::LoginException
Indicates that login failed for an unknown reason.
Fields:
resβ For the apache response object returned by the attempt to log in.cookie_jarβ For the cookie jar which was returned by the attempt to log in.
π WWW::Mediawiki::Client::CookieJarException
Something went wrong saving or loading the cookie jar. πͺ
π WWW::Mediawiki::Client::FileAccessException
Something went wrong saving or loading a file.
π WWW::Mediawiki::Client::FileTypeException
The file which we attempted to operate on is not a .wiki file.
π WWW::Mediawiki::Client::AbsoluteFileNameException
The file which we attempted to operate on is not a .wiki file.
ngl bestie, those last two have the exact same description in the original. We are not fixing it. We are not merging them. We are reporting it with love. π«Ά
π WWW::Mediawiki::Client::CommitMessageException
There is a problem with the commit message.
π WWW::Mediawiki::Client::CommitException
Something went wrong while committing a change.
π WWW::Mediawiki::Client::PageDoesNotExistException
There is no such page, either here or on the server. π
π WWW::Mediawiki::Client::UpdateNeededException
The page on the server has changed since the local file was last updated.
π WWW::Mediawiki::Client::ConflictsPresentException
An attempt was made to commit a file containing conflicts.
π WWW::Mediawiki::Client::CorruptedConfigFileException
The configuration file cannot be parsed.
π WWW::Mediawiki::Client::ServerPageException
Something went wrong fetching the server page.
Throws:
resβ The apache response object which was returned in the attempt to fetch the page.
π WWW::Mediawiki::Client::ReadOnlyFieldException
Client code tried to set a read-only field. rude. π«
π₯ SEE ALSO π₯
Exception::Class
π AUTHORS π
- Mark Jaroski
<mark@geekhive.net>β Author - Bernhard Kaindl
<bkaindl@ffii.org>β Inspired the improvement in error handling and reporting.
πΈ LICENSE πΈ
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.
okay that's the whole page bestie, you ate it, go forth and catch your exceptions responsibly πβ¨ππ¦
this lil gem shipped with perl v5.32.1, dated 2021-12-26 β slay. π
π¦ where this page comes from
- debian bookworm: libwww-mediawiki-client-perl 0.31-2.2
- ubuntu jammy: libwww-mediawiki-client-perl 0.31-2.2
- ubuntu noble: libwww-mediawiki-client-perl 0.31-2.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms