Graphic...l::Error(3)
π NAME
Graphics::Toolkit::Color::Manual::Error β aka the GTC error handling era π
β¨ SYNOPSIS β¨
okay so this manual page is literally here to explain how GTC error messages behave, and how you can switch them up to whatever behaviour you vibe with more. that's it. that's the whole thing. π«Ά
πΈ MODES πΈ
so if a user misspells a method argument or passes in bad data, they're gonna get an error. no way around it bestie. but β and this is the iconic part β GTC knows 5 whole ways to deliver that error to you. five. a whole menu. π
π carp
a warning with a stack trace from the perspective of the GTC caller, delivered via carp (Carp). this one is the default mode, so it's giving main character energy whether you asked for it or not. π
π€ croak
an exception with a stack trace that you absolutely have to deal with, using something alike Try::Tiny or eval. it's not gonna quietly go away. you gotta handle it. no cap. π
π£οΈ say
just a normal string to STDOUT, from the perspective of the GTC method that has the issue with the bad input. lowkey chill. π
β οΈ die
an exception with info from the perspective of the GTC method. dramatic and to the point. π
π€« quiet
the error gets suppressed entirely. so likeβ¦ please check that there's at least a GTC object returned, okay? because otherwise you're just out here with nothing. π
π SETUP π
you pick the error mode with the same use-statement that's also responsible for all the symbol imports. one statement, two jobs, multitasking queen. π
use Graphics::Toolkit::Color qw/color/, error => 'quiet';
π¦ INTRODUCTION π¦
this section is literally just a heading with no content under it. we respect the aesthetic choice. moving on bestie. β¨
π AUTHOR π
Herbert Breunung, <lichtkind@cpan.org> π«Ά
π COPYRIGHT π
Copyright 2026 Herbert Breunung.
πΈ LICENSE πΈ
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
and that's the whole page, bestie β sign-off time: this little doc came to you courtesy of perl v5.42.2, dated 2026-06-21. iykyk π§β
π¦ where this page comes from
- arch rolling: perl-graphics-toolkit-color 2.22-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms