Graphics::Toolkit::Color::Manual::Error(3) User Contributed Perl Documentation Graphics::Toolkit::Color::Manual::Error(3)

Graphics::Toolkit::Color::Manual::Error - GTC error handling

This manual page explains how GTC error messages behave and how to change it to a preferred behaviour.

If a user does misspell a method argument or passes bad data, he will get an error. But GTC knows 5 ways to deliver that error.

Warning with a stack trace from the perspective of the GTC caller via "carp" (Carp). This is the default mode.

Exception with a stack trace that has to be dealt with using something alike Try::Tiny or "eval".

Normal string to STDOUT from the perspective of the GTC method that has the issue with bad input.

Exception with info from the perspective of the GTC method.

The error will be suppressed. Please check if there is at least a GTC object returned.

The error is chosen with the use-statement that is also responsible for all symbol imports.

use Graphics::Toolkit::Color qw/color/, error => 'quiet';

Herbert Breunung, <lichtkind@cpan.org>

Copyright 2026 Herbert Breunung.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2026-06-20 perl v5.42.2