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.
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.