throw correct LoadError from compilecache #12724
Labels
compiler:precompilation
Precompilation of modules
error handling
Handling of exceptions by Julia or the user
Since
Base.compilecache
runs in a subprocess, any exception that is thrown is printed to stderr but is not rethrown in the parent process, which just throws anErrorException
.This is annoying in the case of a module
Foo
that has a syntax error or something else that would ordinarily throw aLoadError
onimport
. All of the nice formatting etcetera (e.g. coloring in the terminal, or special handling in IJulia/Jupyter) is lost and theLoadError
gets printed as plain text, and then anErrorException
is thrown in addition.Is there some way to serialize the
LoadError
and backtrace from the child process so that they get rethrown in the parent process?The text was updated successfully, but these errors were encountered: