I noticed that if there is an error in a Prc() Function, that Discrete Events just continues through the simulation without any indication there was a problem.
Here is an example:
#start of test.jl
using DiscreteEvents, Printf
function errorProcess(c::Clock)
@printf("I'm going to have an error\n")
error("Found Error")
end
function noErrorProcess(c::Clock)
@printf("I'm running fine\n")
delay!(c,0.001)
end
errorPrc = Prc(1,errorProcess)
goodPRc = Prc(2,noErrorProcess)
c = Clock()
process!(c, errorPrc,10)
process!(c,goodPRc,10)
@run! c 0.1
And here is the console output:
julia> include("test.jl")
I'm going to have an error
I'm running fine
I'm running fine
I'm running fine
I'm running fine
I'm running fine
I'm running fine
I'm running fine
I'm running fine
I'm running fine
I'm running fine
"run! finished with 10 clock events, 0 sample steps, simulation time: 0.1"
Is there an easy fix here so that it will actually show the error? Also I haven't found a way to get the debugger to actually break in process! functions.
I noticed that if there is an error in a Prc() Function, that Discrete Events just continues through the simulation without any indication there was a problem.
Here is an example:
And here is the console output:
Is there an easy fix here so that it will actually show the error? Also I haven't found a way to get the debugger to actually break in process! functions.