Question
“How can I handle exceptions on the Server?”
Solution
RB Server automatically handles many common exceptions and sends an error message to the client for display. Unhandled exceptions result in a fatal exception error – the server shuts down and tries to restart itself.
You can add exception handling to yoru custom code by trapping exceptions and re-raising them as EServerError.
Sample Delphi code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
uses rsExceptions; begin try // some code except // re-raise as EServerError on E: Exception do raise EServerError.Create(‘myServer error – ‘ + E.message); end; end; |