The malebolgia documentation says that if a spawned task raises an exception then it will be rethrown after awaitAll. But the example code given below does not seem to do this: it prints 'other error' and only when I i remove 'm.spawn' does it print 'my error'.
Very likely I am misunderstanding something, so if someone can explain this then it would be very much appreciated. (Nim version 2.0.8). import malebolgia type MyError* = ref object of CatchableError proc fn() = raise MyError() proc test() = try: var m = createMaster() m.awaitAll: m.spawn fn() except MyError: echo "my error" except: echo "other error" test() Run