method message

Documentation for method message assembled from the following types:

class Exception

From Exception

(Exception) method message

Defined as:

method message(Exception:D: --> Str:D)

This is a stub that must be overwritten by subclasses, and should return the exception message.

Special care should be taken that this method does not produce an exception itself.

try die "Something bad happened";
if ($!{
    say $!.message# OUTPUT: «Something bad happened.␤» 
}

class X::NYI

From X::NYI

(X::NYI) method message

Returns the message including the above properties.

class X::StubCode

From X::StubCode

(X::StubCode) method message

Returns the custom message provided to !!!, or a reasonable default if none was provided.