class Backtrace::Frame
Single frame of a Backtrace
1 | Methods |
1.1 | method file |
1.2 | method line |
1.3 | method code |
1.4 | method subname |
1.5 | method is-hidden |
1.6 | method is-routine |
1.7 | method is-setting |
2 | Type Graph |
A single backtrace frame. It identifies a location in the source code.
Methods
method file
Defined as:
method file(Backtrace::Frame --> Str)
Returns the file name.
my = Backtrace.new;my = [0];say .file;
method line
Defined as:
method line(Backtrace::Frame --> Int)
Returns the line number (line numbers start counting from 1).
my = Backtrace.new;my = [0];say .line;
method code
Defined as:
method code(Backtrace::Frame)
Returns the code object into which .file
and .line
point, if available.
my = Backtrace.new;my = [0];say .code;
method subname
Defined as:
method subname(Backtrace::Frame --> Str)
Returns the name of the enclosing subroutine.
my = Backtrace.new;my = [0];say .subname;
method is-hidden
Defined as:
method is-hidden(Backtrace::Frame --> Bool)
Returns True
if the frame is marked as hidden with the is hidden-from-backtrace
trait.
my = Backtrace.new;my = [0];say .is-hidden;
method is-routine
Defined as:
method is-routine(Backtrace::Frame --> Bool)
Return True
if the frame points into a routine (and not into a mere Block).
my = Backtrace.new;my = [0];say .is-routine;
method is-setting
Defined as:
method is-setting(Backtrace::Frame --> Bool)
Returns True
if the frame is part of a setting.
my = Backtrace.new;my = [0];say .is-setting; # OUTPUT: «True»