You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is an error within a function call timed with @timeit, sometimes the stacktraces do not report correct file names and line numbers anymore.
mwe.jl
using TimerOutputs
functionfoo(::Float64) end@timeit"foo"foo(1)
Running juila mwe.jl yields
ERROR: LoadError: MethodError: no method matching foo(::Int64)
Closest candidates are:foo(::Float64) at /path/to/mwe.jl:3
Stacktrace:
[1] top-level scope at /home/user/.julia/packages/TimerOutputs/7Id5J/src/TimerOutput.jl:214
[2] include at ./boot.jl:328 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1105
[4] include(::Module, ::String) at ./Base.jl:31
[5] exec_options(::Base.JLOptions) at ./client.jl:287
[6] _start() at ./client.jl:460
in expression starting at /path/to/mwe.jl:5
Some initial testing suggests that this is only a problem if the error occurs at the "function selection/argument evaluation level", i.e., if there is an error during the argument evaluation or if (as in this case) no matching method could be found. I was not able to reproduce this behavior if there are compilation errors from within the timed function.
The text was updated successfully, but these errors were encountered:
When there is an error within a function call timed with
@timeit
, sometimes the stacktraces do not report correct file names and line numbers anymore.mwe.jl
Running
juila mwe.jl
yieldsSome initial testing suggests that this is only a problem if the error occurs at the "function selection/argument evaluation level", i.e., if there is an error during the argument evaluation or if (as in this case) no matching method could be found. I was not able to reproduce this behavior if there are compilation errors from within the timed function.
The text was updated successfully, but these errors were encountered: