troubleshooting Question

How to Pass Line Number to Error Handler in MZ Tools

Avatar of mlcktmguy
mlcktmguyFlag for United States of America asked on
Microsoft Access
7 Comments1 Solution191 ViewsLast Modified:
I used MZ Tools to create and implement a standard error handling routine in my application.

The code I currently insert into a respective module by the MZ Tools error handler.  Looks like this:


'- - - - - - - - - - - - - - - - - - - - - - - - - - G E N E R A T E D  E R R O R  C O D E ----------------
                               If isDeveloper then
                               Else
                                 On Error GoTo $P[CODE_ELEMENT_NAME]_Error    
                               EndIf
'- - - - - - - - - - - - - - - - - - - - - - - - - - G E N E R A T E D  E R R O R  C O D E ----------------

$P[METHOD_BODY]

'- - - - - - - - - - - - - - - - - - - - - - - - - - G E N E R A T E D  E R R O R  C O D E ----------------
                               On Error GoTo 0
                               Exit $P[CODE_ELEMENT_KIND_KEYWORD]
                               $P[CODE_ELEMENT_NAME]_Error:
                               sysErrorHandler Err.Number, Err.Description, "$P[CODE_ELEMENT_NAME]", "$P[PARENT_CODE_ELEMENT_NAME]", "$P[CODE_ELEMENT_KIND_KEYWORD]"
'- - - - - - - - - - - - - - - - - - - - - - - - - - G E N E R A T E D  E R R O R  C O D E ----------------
'



I am getting an error code from a module.  My current error logic tells me the module and subroutine(or function) where the error occurred but not the line number

I can use MZ Tools to put line number on all of the statements.

My question is is:  How to I pull the line number of the line where the error occurred?
ASKER CERTIFIED SOLUTION
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Database Architect / Application Developer
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros