MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / getCurrentCallStackAsStrings

Method getCurrentCallStackAsStrings

src/hx/Debug.cpp:351–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351void StackContext::getCurrentCallStackAsStrings(Array<String> result, bool skipLast)
352{
353 int n = mStackFrames.size() - (skipLast ? 1 : 0);
354
355 for (int i = 0; i < n; i++)
356 {
357 // Reverse call stack to match exception stack
358 StackFrame *frame = mStackFrames[n-1-i];
359 result->push(frame->toString());
360 }
361}
362
363void StackContext::getCurrentExceptionStackAsStrings(Array<String> result)
364{

Callers 1

__hxcpp_get_call_stackFunction · 0.80

Calls 3

sizeMethod · 0.45
pushMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected