Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99142

VS Code + Python -> Erros in Pool.Apply_async are ignored?

$
0
0

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?


Viewing all articles
Browse latest Browse all 99142

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>