Help language development. Donate to The Perl Foundation

LogP6 cpan:ATROXAPER last updated on 2021-02-23

lib/LogP6/Exceptions.rakumod
class X::LogP6::PatternIsNotValid is Exception {
	has $.pattern;
	method message() {
		"Wrong writer pattern format: <$!pattern>";
	}
}

multi sub logp6-error(Exception:D $x) is export {
	$*ERR.print('LogP6 error: ', $x.^name, ': ', $x.message, $?NL, $x.backtrace);
}

multi sub logp6-error(Str:D $x) is export {
	$*ERR.say('LogP6 error: ', $x);
}