Handling unhandled errors in a VBScript web site? -


i've inherited big ugly mess of code written in several languages. part of mess that's written in c# seems set log uncaught exceptions in log file. there part of program in vbscript doesn't log errors.

is there simple way of making vbscript code catch uncaught errors , log them somewhere? think answer may "no" because vbscript doesn't have try-catch, having "on error resume next" instead.

edit: well-aware of fact error handling in vbscript different vb.net. wondering if there trick/hack allow me handle errors otherwise unhandled.

vbscript not support concept of error handling continuing execution @ label. in other words, cannot use on error goto in vbscript. instead, use on error resume next , check both err.number , count property of errors collection.

handling errors in vbscript

something else may uncover vbscript errors use of option explicit. forces explicit declaration of variables , prevents accidental reuse of name of declared variable. also, if mistype declared variable's name or try use undeclared variable, error message generated.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -