Errors
Term.Errors.StacktraceContextTerm.Errors.add_new_module_name!Term.Errors.add_number_frames_skipped!Term.Errors.add_stack_frame!Term.Errors.add_stack_frame!Term.Errors.frame_moduleTerm.Errors.frame_moduleTerm.Errors.frame_moduleTerm.Errors.get_frame_function_nameTerm.Errors.install_term_stacktraceTerm.Errors.parse_kw_func_nameTerm.Errors.render_backtraceTerm.Errors.render_error_code_lineTerm.Errors.should_skip
Term.Errors.StacktraceContext — Type
Stores information useful for creating the layout of a stack trace visualization.
Term.Errors.add_new_module_name! — Method
add_new_module_name!(content, ctx::StacktraceContext, curr_modul)When a frame belonging to a module different from the previous one is shown, print the new module's name.
Term.Errors.add_number_frames_skipped! — Method
add_number_frames_skipped!(content, ctx, to_skip, num, bt, n_skipped, skipped_frames_modules)Add some text explaining how many frames were skipped from the stacktrace visualization and to which modules they belonged.
Term.Errors.add_stack_frame! — Function
function add_stack_frame! endCreate a Term visualization of info and metadata about a stacktrace frame.
Term.Errors.add_stack_frame! — Method
add_stack_frame!(frame::StackFrame, ctx::StacktraceContext, num::Int; kwargs...)Renders a panel with:
- frame number
- function name/signature
- source code at error line
Term.Errors.frame_module — Method
function frame_module endGet the Module a function is defined in, as a string
Term.Errors.frame_module — Method
Get module for a pointer obj
Term.Errors.frame_module — Method
Get module from file path.
Term.Errors.get_frame_function_name — Method
get_frame_function_nameGet and stylize a function's name/signature
Term.Errors.install_term_stacktrace — Method
install_term_stacktrace(; reverse_backtrace::Bool = true, max_n_frames::Int = 30)Replace the default Julia stacktrace error stacktrace printing with Term's.
Term parses a StackTrace adding additional info and style before printing it out to the user. The printed output consists of two parts: - a list of "frames": nested code points showing where the error occurred, the "Error Stack" - a message: generally the standard info message given by Julia but with addintional formatting option.
Several options are provided to reverse the order in which the frames are shown (compared to Julia's default ordering), hide extra frames when a large number is in the trace (e.g. Stack Overflow error) and hide Base and standard libraries error information (i.e. when a frame is in a module belonging to those.)
Term.Errors.parse_kw_func_name — Method
parse_kw_func_name(frame::StackFrame)Kw function calls have a weird name, parse arguments to get a proper function signature.
Term.Errors.render_backtrace — Method
render_backtrace(bt::Vector; reverse_backtrace = true, max_n_frames = 30)Main error backtrace rendering function. It renders each frame in a stacktrace after some filtering (e.g. to hide frames in BASE). It takes care of hiding frames when there's a large number of them.
Term.Errors.render_error_code_line — Method
render_error_code_line(frame::StackFrame; δ=2)Create a Panel showing formatted Julia code for a frame's error line. The parameter δ speciies how many lines above/below the error line to show.
Term.Errors.should_skip — Method
should_skipA frame should skip if it's in Base or an installed package.