RTC Forums
April 19, 2024, 06:16:14 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: How are server errors handled?  (Read 2991 times)
DPerkins
RTC License
***
Posts: 37


« on: January 03, 2014, 03:54:46 PM »

If on the server I encounter an error when processing a request, is it up to me to devise a method to send that error back to the client?  Let's say that an exception is thrown in an TRtcFunction.OnExecute routine.  Does RTC silently handle it, or should it be propagated back to the client?  I thought I had read that the latter was correct, but the former is happening.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: January 03, 2014, 04:57:51 PM »

Exceptions that get out of the OnExecute event connected to the TRtcFunction component will be caught by the TRtcServerModule and sent back to the client with Result.asType = rtc_Exception and the Result.asException containing the exception message. But that is just the default. It unless the exception is a result of bad function usage, it would be better if you would handle it on the Server side and let the Client know what's wrong by sending a custom result.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.022 seconds with 16 queries.