Board index » delphi » Exception handling on the server
derek
![]() Delphi Developer |
derek
![]() Delphi Developer |
Exception handling on the server2004-05-18 06:07:12 AM delphi8 At the moment when an exception occurs on the server I pass back two variables to my client - the error code and the message. I also want to pass back the name of the procedure which caused the exception. Is this possible other than using a string and setting the name in code? Derek |
Marc Rohloff
![]() Delphi Developer |
2004-05-18 10:17:59 PM
Re:Exception handling on the server
derek wrote on Tue, 18 May 2004 10:07:12 +1200 ...
QuoteAt the moment when an exception occurs on the server I pass back two up an IErrorInfo object. There are a couple of hooks into this process that you could use or you could just override SafeCallException and do the whole thing yourself. You can use one of the exception tracking utilities around (We use the JCL) to get the procedure where the exception occurred and add it to the IErrorInfo object. You then have to handle this on the client and extract the information you want from the IErrorInfo object there. Marc Rohloff marc rohloff at bigfoot dot com |
Deepak Shenoy
![]() Delphi Developer |
2004-05-19 09:09:34 PM
Re:Exception handling on the server
derek writes:
QuoteAt the moment when an exception occurs on the server I pass back two (www.delphi-jedi.org, Jedi Code Library) to unwind the stack and find out where the exception was raised. You can also use commercial tools like Exception Magic etc. to get call stack information. This is definitely not for production code, of course. -- Deepak Shenoy (TeamB) Agni Software www.agnisoft.com |