Take a look at this code:
import multiprocessing as mp
def myFunc():
nonExistingObject.DoSomething()
def collectFunc():
pass
#uncomment me for desired behaviour
#myFunc()
pool = mp.Pool(2)
pool.apply_async(myFunc, args=(), callback=collectFunc)
If you run it on VS Code, the code completes and no errors are reported, but of course there's an error going on. Not only nonExistingObject
is not defined but DoSomething()
also isn't.
If you uncomment the indicated code, you will get the expected error @ runtime. On VSCode I already checked the "Uncaught Exceptions" breakpoints
Is there a way to make the error get caught? is this a python thing or a VSCode thing?