WWW::M...ptions(3pm)

πŸ“¦
version 0.31 Β· 3 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

✨ 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