ASP / VBScript Function Errors
Posted on 2012-04-12
I am developing an application in ASP and have moved all my SQL statements into functions. This is to allow me to log activity and create an audit trail.
Now whenever the SQL throws an error it references the line of the function that executes the SQL. However, it is (almost) always the variables that have been sent to the function that have caused the error. Unfortunately I don't always know where the function was called from. Some pages reference update or insert function multiple times for different data.
I am therefore wasting a lot of time working out where the error originated from. Is there any way to establish where the function was called from. I could then use this to write it to the screen when there is an error.