Skip to content

Call stack #4

@RealyUniqueName

Description

@RealyUniqueName

haxe.CallStack.callStack() and haxe.CallStack.exceptionStack() should contain valid stack including suspend points. Maybe add a Suspend(item:StackItem) constructor to StackItem enum.
Example:

class Test {
  async function root() {
    await timerDelay(3000);
    await level1();
  }

  async function level1() {
    level2();
  }
  
  async function level2() {
    throw "Terrible error";
  }
}

Exception stack for Terrible error should be like this:

Method('Test', 'root');
Suspend(Method('Test', 'level1'));
Method('Test', 'level2');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions