JE::Ob...ceError(3pm)

πŸ“¦
version 0.066 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– JE::Object::Error::ReferenceError β€” the manual page, bestie edition πŸ’–

okay so real quick, this is from the User Contributed Perl Documentation, and the page is literally called JE::Ob...ceError(3pm) because someone's terminal was not beating the truncation allegations. we're talking about JE::Object::Error::ReferenceError today and honestly? she's niche but she's important. πŸ¦‹


✨ NAME ✨

JE::Object::Error::ReferenceError β€” the JavaScript ReferenceError object class. that's it, that's the name, no cap. πŸ’…


✨ SYNOPSIS ✨

here's the vibe, in code:

use JE::Object::Error::ReferenceError;

# Somewhere in code called by an eval{}
die new JE::Object::Error::ReferenceError $global,
        "(Error message here)";

# Later:
$@->prop('message');  # error message
$@->prop('name');     # 'ReferenceError'
"$@";                 # 'ReferenceError: ' plus the error message

so you use the class, you die with a fresh one of these bad boys passing in $global and your error message, and then later you can poke at it β€” grab the message, grab the name (spoiler: it's 'ReferenceError' πŸ‘‘), or just stringify the whole thing with "$@" and get 'ReferenceError: ' stitched onto the front of your message. iconic behaviour, honestly. ✨


✨ DESCRIPTION ✨

this class implements JavaScript ReferenceError objects for JE. that's the whole job and she does it well. 🫢


✨ METHODS ✨

not gonna reinvent the wheel here β€” the methods live in JE::Types and JE::Object::Error. go read those, bestie, they got you. πŸ’œ


✨ SEE ALSO ✨

the whole friend group, in order:

  • JE
  • JE::Types
  • JE::Object
  • JE::Object::Error

lowkey a tiny page but highkey essential if you're out here catching reference errors in JE. don't skip the SEE ALSO, that's where the lore is. 🌸

and that's the tea! this page came to you from perl v5.36.0, dated 2023-08-25, under the JE::Ob...ceError(3pm) title (truncated with love 😭). go forth and reference-error responsibly, bestie. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from