JE::Ob...::Error(3pm)
π JE::Ob...::Error(3pm) π
okay bestie, so this is a page from the User Contributed Perl Documentation β section 3pm, aka perl module manpages. Pull up a chair, we're talking about JavaScript error objects and honestly? iconic behavior. π¦
β¨ NAME β¨
JE::Object::Error β the JavaScript Error object class. yeah. that one. π
β¨ SYNOPSIS β¨
use JE::Object::Error;
# Somewhere in code called by an eval{}
die new JE::Object::Error $global, "(Error message here)";
# Later:
$@->prop('message'); # error message
$@->prop('name'); # 'Error'
"$@"; # 'Error: ' plus the error message
so like, you use it, you die with one of these bad boys from inside something an eval{} is running, and then later you can poke at $@ and it will just tell you things. the way that "$@" stringifies into the full Error: situation?? obsessed. π
β¨ DESCRIPTION β¨
This class implements JavaScript Error objects for JE. No cap. π
It's the base class for all of JavaScript's native error objects β like, the whole family tree starts here. (scroll down to SEE ALSO if you wanna meet the relatives π)
β¨ METHODS β¨
head over to JE::Types for the lowdown on most of the methods, bestie β that's where the general stuff lives. only the stuff that's specific to JE::Object::Error gets explained right here. πΈ
The value method returns the string 'Error: ' followed by the error message. and for subclasses? the 'Error' part gets swapped out for the class name β which is literally just whatever ->class hands back. so like, it knows its own name. main character energy fr fr. π
β¨ SEE ALSO β¨
JEJE::ObjectJE::Object::Error::RangeErrorJE::Object::Error::SyntaxErrorJE::Object::Error::TypeErrorJE::Object::Error::URIErrorJE::Object::Error::ReferenceError
the whole error-object friend group π«Ά go say hi.
and that's the page!! this one shipped as perl v5.36.0, dated 2023-08-25 π slay, go catch some errors, ily, bye πβ¨
π¦ where this page comes from
- debian trixie: libje-perl 0.066-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libje-perl 0.066-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libje-perl 0.066-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libje-perl 0.066-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms