Error Handling and Debugging

Last Updated: 9/17/2009



Sections above here:
Home  »  Development  »  Ajax

Sections below here:

    Topics in this section:
    IW Ajax Limitations
    Error Handling and Debugging
    Update Protocol
    Async Event Handling

    Search Documentation:

    If an asynchronous request does not succeed, then by default, the message , no error will be shown.

    If you have the following event:

    procedure TIWForm1.IWButton1AsyncClick(Sender: TObject;
      EventParams: TStringList);
    begin
      IWLink1.Caption := DateTimeToStr(now);
    end;

    then an asynchronous request is sent to your server, when you click on IWButton1. If the session already expired, a  temporary connection problem exists etc, then this async request will not succeed. IntraWeb will silently hide that error condition by default.

    If you want an error message (alert) to be shown, because you are debugging your application then you may set a global JavaScript DEBUG  variable to true. You can do that during the initial rendering of your form for example:

    procedure TIWForm1.IWAppFormRender(Sender: TObject);
    begin
      AddToInitProc('DEBUG=true;');
    end
    ;

    This can of course also be done from within any of your custom JavaScript routines.

    There is also a debugAlert(AMessage) function, which may be used from your own JavaScript code. This will show an alert only if DEBUG==true.




    (C) 2002-2009 - Atozed Software Ltd.