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

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to