role X::Comp

Common role for compile-time errors
role X::Comp is Exception { }

Common role for compile-time errors.

Note that since the backtrace of a compile time error generally shows routines from the compiler, not from user-space programs, the Backtrace returned from the backtrace method is not very informative. Instead the exception carries its own filename, line and column attributes and public accessors.

If an error occurs while creating an object (like a class or routine) at compile time, generally the exception associated with it does not hold a reference to the object (for example a class would not be fully composed, and thus not usable). In those cases the name of the would-be-created object is included in the error message instead.

Methods

method filename

The filename in which the compilation error occurred

method line

The line number in which the compilation error occurred.

method column

The column number of location where the compilation error occurred. (Rakudo does not implement that yet).

See Also

role X::IO

IO related error

role X::OS

Error reported by the operating system

role X::Pod

Pod related error

role X::Proc::Async

Exception thrown by Proc::Async

role X::Syntax

Syntax error thrown by the compiler

role X::Temporal

Error related to DateTime or Date

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.