Mason:...eptions(3pm)

πŸ“¦
version 2.24 Β· 2 versions
  • 2.24 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 2.24 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Mason::Exceptions β€” the tea on Mason's exception objects πŸ’–

okay bestie, welcome to Mason::Exceptions (3pm), from the User Contributed Perl Documentation pile 🫢 this one is short but it's giving important, so let's get into it ✨


✨ NAME ✨

Mason::Exceptions β€” the exception objects that Mason throws at you, no cap πŸ’…


🌸 DESCRIPTION 🌸

so here's the vibe: this module is the one that creates the exception classes that Mason uses πŸŽ€

and here's the lil nuance that lowkey matters β€” Mason only throws exception objects when it genuinely needs to communicate something specific to whatever code is out there catching the exception πŸ‘‘ any other time? it's perfectly content to just die with a plain string. periodt. πŸ’€


πŸ¦‹ EXCEPTIONS πŸ¦‹

here are the exception classes, one by one, no skipping 🌈

Mason::Exception::Abort

this one means the $m->abort method got called πŸ™ˆ

and not me telling you β€” exceptions in this class contain the field aborted_value πŸ’œ that's where the value lives, bestie.

Mason::Exception::TopLevelNotFound

this one means the requested top level component that got passed to exec() could not be found 😭 iconic behavior honestly.

and here's the practical part β€” in a web environment, you could use this to figure out that a 404 should be returned ⭐ slay.


πŸ’« SEE ALSO πŸ’«

  • Mason

πŸ‘‘ AUTHOR πŸ‘‘

Jonathan Swartz <swartz@pobox.com> πŸ’Œ


This software is copyright (c) 2012 by Jonathan Swartz.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. 🫢 (yes bestie, same terms as Perl 5 itself β€” that's the whole license, fr fr)


πŸ’– okay that's the whole page, and for the record: this was perl v5.34.0, dated 2022-05-27, and the page itself is Mason:...eptions(3pm). mwah, go catch those exceptions πŸ’…βœ¨
πŸ“¦ where this page comes from