Error Handling

  • Thread starter MangoMan ( Dave Cousineau )
  • Start date
M

MangoMan ( Dave Cousineau )

i have a good system of error handling setup, but im wondering if theres a way to tell what line the error occurred on
the way it is now, errors are logged, along with workstation, username, date and time, form and procedure name, and error number and description. the only problem is i have no idea where in the procedure the error occurred, unless i am there to witness the error personally, which usually isnt the case

( im using Access 97 )
 
A

Allen Browne

No. There is not a simple way to determine this.

You can determine the most recent label in the procedure with ERL - a throw
back to the old BASIC interpreter where lines were numbered. You can still
number the lines and use ERL, but it causes a significant performance hit.

The best solution is to break out the bits that ere likely to cause errors
into smaller procedures. For example, if you are relying on a file being
present, you may want to use a FileExists() function which will get any
error, rather than try to figure out which line of the main proc referred to
the problem file.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
i have a good system of error handling setup, but im wondering if theres a
way to tell what line the error occurred on.
the way it is now, errors are logged, along with workstation, username,
date and time, form and procedure name, and error number and description.
the only problem is i have no idea where in the procedure the error
occurred, unless i am there to witness the error personally, which usually
isnt the case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top