How can I consume server exceptions on the client?

When a server exception is passed down to the client, it is presented to the user with a generic “An exception was raised on the server…” message.

How can I intercept and consume these exceptions?

I have certain exceptions which I raise on the server and which I want to handle on the client with my own logic rather than just showing a default message.

Whilst I can use the OnException event handler on my client channel component, once I’ve done my processing, the above error message is still displayed. I can’t find a way of supressing this message in cases where I’ve dealt with the exception myself.

Could you specify which platform (Delphi, .NET) you’re using?

I’m using DA8 on Delphi.

It seems I can do what I need by ignoring the OnException handler on the channel component and instead trapping the exception globally via TApplicationEvents. I think this is the only way I can handle and then completely suppress certain exceptions.

Thanks, I’ll pass it to the right person.

Have you tried OnServerException event?

Aha thanks, I’ll give that a go