Print Page | Close Window

Server Exception Handling

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2440
Printed Date: 26-Mar-2025 at 5:43am


Topic: Server Exception Handling
Posted By: gregweb
Subject: Server Exception Handling
Date Posted: 14-Jan-2011 at 8:41am
In WCF Ria Services, there is an exception type called DomainException() that can be used to pass Exceptions back across the wire to the client where it can be retrieved in Operation.Error.
 
Is there a similiar Exception class for DevForce?
 
For example:
 
 public static class MailService
    {
        [AllowRpc]
        public static object GetNewMail(IPrincipal pPrincipal, EntityManager pPm, params Object[] pArgs )
        {
            //There is a problem retrieving new mail, so return an exception to the client.
            return "Got Mail";
        }

    }
 



Replies:
Posted By: gregweb
Date Posted: 14-Jan-2011 at 12:50pm
In testing this out some more, it appears that any unhandled exception during the RPC gets returned back to the Client as an InvokeServerMethodOperation.Error which is what I was looking for.
 
Greg



Print Page | Close Window