Error Handling

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 )
 
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.
 
Back
Top