Thanks. Does it mean that, as a user, it is valid to call schedule(t, exception, error=true) only if the task is not scheduled yet, like this?
julia> t = @task nothing
Task (runnable) @0x00007f3b6dd9cc40
julia> schedule(t, InterruptException(), error=true)
Task (failed) @0x00007f3b6dd9cc40
InterruptException: