liyonghelpme / n-act

Automatically exported from code.google.com/p/n-act
0 stars 0 forks source link

NAct doesn't forward exceptions #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As demonstrated in:

https://gist.github.com/4133844

Original issue reported on code.google.com by Forbes.Lindesay on 23 Nov 2012 at 3:06

GoogleCodeExporter commented 9 years ago
Ah, that's kind of intentional. It's much more normal to use async void methods 
between actors that it is in other async code, so you generally have to accept 
that exceptions live in a single actor. Letting them escape in some situations 
would be inconsistent. Slightly annoying for testing, I accept. I like to run 
unit tests, at least, using un-wrapped instances of actor classes to get timely 
exceptions. When you need actors to interact without deadlocking though, you 
have to rely on any exceptions taking the test runner down, and do some trial 
and error to work out which test caused it.

Original comment by alexdavi...@gmail.com on 23 Nov 2012 at 6:56

GoogleCodeExporter commented 9 years ago
hmm, it wasn't bringing down the test runner for me, they were just 
disappearing, that sample I posted also never terminates.  If exceptions aren't 
going to be forwarded, I would've thought they should be thrown and kill the 
application.

I still really need a way for exceptions to be forwarded (otherwise I'm going 
to keep returning Tuple<result,exception> for everything, which gets silly, 
perhaps it could be an option?

Original comment by Forbes.Lindesay on 24 Nov 2012 at 10:50