Open jakebolewski opened 9 years ago
Would the exception get thrown from wherever GC happened to occur, or only the finalize
function?
The non-locality of throwing the error whenever GC happened seems a bit problematic, I was thinking of just adding an extra parameter to finalize(x, raise::Bool=false)
which you could then just call explicitly in the test suite with finalize(x, true)
.
Perhaps throwing an error should be the default behavior when finalize
is explicitly called by the user.
Agreed; it seems totally fine for this to just be part of finalize
.
Currently when there is an error thrown in a finalizer, the error is swallowed and an error message is printed.
Could we add an option for the error not to get swallowed for testing purposes? When bugs are introduced into the finalizer function most CI tests will silently pass.