Documentation for sub warn
assembled from the following pages:
Class: Exception §
From Exception
(Exception) sub warn §
Defined as:
multi sub warn(*)
Throws a resumable warning exception, which is considered a control exception, and hence is invisible to most normal exception handlers. The outermost control handler will print the warning to $*ERR
. After printing the warning, the exception is resumed where it was thrown. To override this behavior, catch the exception in a CONTROL
block. A quietly {...}
block is the opposite of a try {...}
block in that it will suppress any warnings but pass fatal exceptions through.
To simply print to $*ERR
, please use note
instead. warn
should be reserved for use in threatening situations when you don't quite want to throw an exception.
warn "Warning message";