Skip to content

backtracing errors (original line) #139

@filchristou

Description

@filchristou

I know it might be a lot to do, but still why not mentioning it in an issue..
Currently there is zero backtrace from the original source code regarding to errors.
This might be more of a ResumambleFunctions.jl issue.
E.g. In the following code, copied from the basic example I substituted event with eventerror in the second line of the resumamble function.

# contained in file called "consimtemp2.jl"
using ResumableFunctions
using ConcurrentSim

@resumable function example(env::Environment)
  event = timeout(env, 1, value=42)
  value = @yield eventerror
  println("now=", now(env), ", value=", value)
end

sim = Simulation()
@process example(sim)
run(sim)

When running it I get the following error code:

Image

Which basically shares zero info on where is the error in the original code that I can interact with..
(line 12 is the run(sim) line)
For small examples like this is it's obvious, but for bigger projects with many events that can be a struggle.
Do you maybe have other ways to debug such situations ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions