Pandoc::Error(3pm)
π Pandoc::Error π
okay bestie, so this is Pandoc::Error β it's the class that handles Pandoc document processing errors π«Ά. It lives in the User Contributed Perl Documentation corner of the world, and honestly? It's giving "quietly holding the whole error-handling situation together" energy. π
β¨ SYNOPSIS β¨
Here's the vibe, in actual code, copied exactly, no notes:
use Try::Tiny;
try {
...
} catch {
if ( blessed $_ && $_->isa('Pandoc::Error') ) {
...
}
};
Likeβ¦ you wrap the risky stuff in try, and in catch you go "hmm, is this actually a Pandoc::Error?" with blessed $_ and $_->isa('Pandoc::Error'), and then you do your lil ... thing. πΈ
π METHODS π
throw( [ %fields ] )
Throw an existing error, or create a brand new error and throw that one. π₯
Setting the field message is recommended β like, do it, bestie, it's the whole point. The message also gets enriched with the error location, so it's not just floating there with no context. π
And if you want a stack trace, you can add one with $Carp::Verbose or Carp::Always. No cap. π
message
This is the error message itself. It's also what you get back when the thing gets stringified. So yeah, it's the main character twice. β
π SEE ALSO π
Big important tea β: this class does not inherit from Throwable, Exception::Class or Class::Exception β but it may do so in a future version. So like, don't build your whole personality around its current parentage, iykyk. π
and that's the whole page, bestie, you ate πβ¨
this lil writeup came from Pandoc::Error(3pm), part of the User Contributed Perl Documentation, and the footer said perl v5.38.2 with a date of 2024-08-03 π¦ β so if future-you is reading this, hi, check if anything changed, love u, bye π
π¦ where this page comes from
- debian trixie: libpandoc-wrapper-perl 0.9.2-1 Β· EUPL-1.2
- ubuntu resolute: libpandoc-wrapper-perl 0.9.2-1 Β· EUPL-1.2
- ubuntu stonking: libpandoc-wrapper-perl 0.9.2-1 Β· EUPL-1.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms