






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Students of Communication, study E-Commerce as an auxiliary subject. these are the key points discussed in these Lecture Slides of E-Commerce : Error Handling, Active Server Pages, Web Programming, Negative Browsing, Experience, Handle Errors, Page Causes, Trap Executes, Error Handling Causes, Implemented Error
Typology: Slides
1 / 11
This page cannot be seen from the preview
Don't miss anything!







The purpose of error handling is to prevent the user fromhaving a negative browsing experience on your site.
-^
The best way to handle errors on the web is to avoid them.
-^
Error handling in ASP carries with it some performancepenalties^ –
Any error handling on a page causes overhead– Each statement within an error trap executes more slowly– Poorly implemented error handling causes progressive problemsand can cause your entire web application to fail.– Worse, poorly implemented error handling can cause businesslogic to execute (or not) that has unfortunate consequences for thedata integrity of your site.
-^
-^
Number
= Error Number (Default Property) Zero
means no Error.
-.
Description
= Text Narrative of Error (Property) This
changes to be specific for this error instance.
-.
Clear
--> Method to clear error
RaiseError
--> Method to generate your own run time
errors.
-^
Prevent errors that can be anticipated–
Code defensively– Most errors in VbScript can be avoided
-^
Handle known errors that can not be prevented^ –
429 “Cannot create object”
-^
Various ADO errors.
-^
Design Goal: Make each task transactional and atomic^ –
Have an error handler in the topmost event
-^
Know where the app should be in case of error
-^
Raising Errors is not a good technique for “vanilla” ASP.^ –
Really that technique is designed for pages running in an MTS contextand is out side the scope of this class.
Function Divide(X, Y)
Dim dRetdRet =
If Y <> 0 then
dRet = X / Y
End ifDivide
= dRet
Exit Function End Function
Problem:
Divide by zero
is evil. Solution:
Check for a
problem beforecalculating. Give a safenon-answer. Practice:
Good.
Be careful that you do not use error handling as a substitutefor^ –
Good Coding.– Failure to Trap and Avoid Bad Data.– Common Sense.
-^
Use only where you MUST!^ –
Creating non-intrinsic objects using CreateObject()– External Methods (Such as sending an e-mail)
-^
Always CLEAR your errors as soon as possible
-^
Never leave an open error trap across scope levels in ASP.E.g. make sure you clear your error trap before returningfrom a function or sub