[fpc-devel] fcl-web webdata ExtJS "total" field question

ABorka fpc-devel at aborka.com
Fri Aug 20 21:40:50 CEST 2010


...snip...
>
> Exceptions are usually caught and transformed to the correct response.
> I coded an event that allows to influence this process.
>
> Michael.

Yes, the ones raised within FCL-web are caught. I was thinking about the 
ones raised within the developer's code, when handling the actions, or 
checking the user input from form submit, etc.
For example if I have a login form and ExtJS submits it to the server, 
but the login or password didn't match, we need to reply with a 
success=false and an error message in a proper response format.
I was thinking there could be something available for the developers to 
help format this response properly to ExJS.
It's not a big deal though, one can always just do a

     except
       on E: Exception do
Response.Content := '{ "success" : false, "message" : "' + E.Message + 
'"}';
     end

AB




More information about the fpc-devel mailing list