For a Perl 6 compiler to support typed exceptions properly, the following steps must be taken:
The compiler writer needs to implement the types
as described in S32::Exception.
When the compiler passes an exception object to the user space (ie
$! and inside a
CATCH block also
it needs to make sure that the type conforms to type
wrapping it in
X::AdHoc if that is not the case.
Exceptions from non-Perl 6 sources should be boxed into a Perl 6 Str as the payload of an
The next step is to import the exception classes and roles from S32::Exception
The compiler needs to provide the named
column arguments to the constructor of the exceptions thrown from within the compiler (TODO: TimToady wants a characters offset,
not (just) line and column).