AppSpaces unhandled error behavior ?

Sep 30, 2011 at 8:54 PM
Edited Sep 30, 2011 at 8:55 PM

Hi !

I follwed the explanation ["http://xcoappspace.codeplex.com/wikipage?title=ExceptionHandling&referringTitle=Home"], but
this does not seem to work - or, at least - different, than I've expected ;-) ?

If the contract is like this:

 

public class Job
{
	public string Message;
	public Port<string> Reply;
}

 

and the handler like this:

 

void ProcessJob(Job job)
{
    ApplicationException ae = new ApplicationException("[server-worker]A spaces unhandled error.");
    throw(ae);
    job.Reply.Post(job.Message + " (Back)"); //Naturally, does never happen.
}

The errors is not handled at all.

Is there a generic handler for uncatched errors? In .Net Remoting, an exception on the server side, would
be thrown at the client.

Some enlightning could help.

Thanks so far and
best regards,

++mabra

Coordinator
Oct 3, 2011 at 9:10 AM

Hi mabra,

How does your client code look like - have you used an exception port and PostWithCausality? Despite of that there shouldn't be any problems with your code.

Currently there is no generic error handler - the space.Errors port only handles errors uncaught errors with communication and serialization - to catch errors that are thrown within your own code you always have to install a causality (either by PostWithCausality, or by Dispatcher.AddCausality, as described in the documentation).

Best Regards
Thomas

Oct 3, 2011 at 10:31 AM

Hi Thomas !

Sorry, this was a [not recognized] error in my code. This moment, I just wrote it again -again,  from your samples.
The shown example works like expted!

Sorry Thomas!

Best regards,

++mabra