Results 1 to 3 of 3

Thread: trapping server side error messages

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254

    trapping server side error messages

    Hi,
    does anyone know how to trap server side error messages and prevent annoying message boxes appearing. This can be done on the client with the window onError event, but I require information on how to trap say Runtime Errors.

    Thanks in advance

    Lenin

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Disable server side debugging and you won't be able to get server side msgboxes.

    Server side errors generate compile errors and are sent to the html stream unless you disable them with 'on error resume next'.

    You can then trap the errors by checking if Err.number <> 0 after an operation that could cause an error and handling it. You can also (highly recomended) write a error handler that is included in all your pages and called when an error occurs:

    Code:
    If Err.number <> 0 Then 
        call errorHandler
    End If
    .
    .
    .
    Sub errorHandler
    'Whatever...
    End Sub
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254
    Many thanks Monte96


    Lenin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width