|
-
Jan 29th, 2002, 09:09 AM
#1
Thread Starter
Addicted Member
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
-
Jan 29th, 2002, 10:21 AM
#2
Frenzied Member
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..
-
Jan 29th, 2002, 11:45 AM
#3
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|