Packages

BEAM stack trace in Gleam: a stack trace of stack frames with module name, function name, arity, file name and line number.

Current section

Files

Jump to
stacky src stacky@internal@examples@example_readme.erl
Raw

src/stacky@internal@examples@example_readme.erl

-module(stacky@internal@examples@example_readme).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([main/0]).
-spec main() -> nil.
main() ->
Stack_trace = stacky:trace(),
gleam@io:print(<<"\n"/utf8>>),
gleam@io:println(<<"Trace to string:"/utf8>>),
_pipe = Stack_trace,
stacky:print_trace(_pipe),
gleam@io:print(<<"\n"/utf8>>),
Stack_frame = begin
_pipe@1 = Stack_trace,
stacky:frame(_pipe@1, 0)
end,
gleam@io:println(<<"Frame with context:"/utf8>>),
_pipe@2 = Stack_frame,
stacky:print_frame_with(_pipe@2, {<<"my_context"/utf8>>}).