Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better error message instead of @resumable function has stopped #52

Open
hdavid16 opened this issue Mar 24, 2021 · 5 comments
Open

better error message instead of @resumable function has stopped #52

hdavid16 opened this issue Mar 24, 2021 · 5 comments

Comments

@hdavid16
Copy link
Member

hdavid16 commented Mar 24, 2021

What causes this error? I am trying to interrupt a process in SimJulia using SimJulia.interrupt

ERROR: @resumable function has stopped!
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] (::ProcessSim.var"##312")(::Nothing) at C:\Users\HD\.julia\packages\ResumableFunctions\n1hTu\src\macro.jl:88
 [3] execute(::SimJulia.Put, ::Process) at C:\Users\HD\.julia\packages\SimJulia\alkAr\src\processes.jl:32
 [4] (::SimJulia.var"#1#2"{typeof(SimJulia.execute),SimJulia.Put,Tuple{Process}})() at C:\Users\HD\.julia\packages\SimJulia\alkAr\src\base.jl:51 

Also, is there a way to know which resumable function stopped? I have nested processes.

@BenLauwens
Copy link
Collaborator

I can return also the name of the @resumable function, the instance of the process is not known.
Does this help?

@hdavid16
Copy link
Member Author

Yes. That would be helpful when debugging. Thanks

@MarkNahabedian
Copy link

I see this error if I pass a ResumableFunctions iterator as the first value of Base.intersect:

using ResumableFunctions

@resumable function onetwothree()
    @yield 1
    @yield 2
    @yield 3
end

intersect(onetwothree(), [2])

ERROR: @resumable function has stopped!
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35

If there's isn't already an issue for this, I'll open one.

@Krastanov
Copy link
Member

for future reference, this is now reported in #107

@Krastanov Krastanov changed the title Resumable function has stopped better error message instead of @resumable function has stopped Nov 21, 2024
@Krastanov
Copy link
Member

a naive attempt at fixing this issue is now in #114 but it allocates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants