Hi Greg
 
Perhaps I should mention that the prog hasn't experienced any errors.
Rather I simulated one by pasting Error <errno> in the code, in order to
fire the error routine.

Maybe the error is indeed in the error routine.
 
I put trace notes in the code (see below) to see what goes on in the
error routine.
It passes the first note - commented with (1), then (2), then when the
note is released I don't know what happens as this is where it bombs
out.

Can you see anything wrong.  Perhaps in the function params declaration?

'ppreciate the help and interest, as usual.

Best

Terry
 
========================================================================
====================
Function ERROR_REPORT( ByVal tnErrNo as Integer, ByVal tcErrMess, ByVal
tcProcName as String, 
                             ByVal tAsk as Logical) as Logical
'____________________ 'If supplied with a tcProName (param) include that
in the message.
'If tlAsk param is true:  then use ASK() function to ask if continue or
not.
'ELse                             then use NOTE proc just to display the
message.
'____________________________
 Dim    lcMessage               as String,
                llContinue      as Logical
note "in ERROR_REPORT"   ' (1)
 llContinue             = TRUE
 lcMessage              = "Error No: " + RTrim$( Str$( tnErrNo)) + Chr$(
13) + RTrim$( tcErrMess)
 If tcProcName <> "" then
        lcMessage               = lcMessage + Chr$( 13) + ", in
procedure " + RTrim$( tcProcName) + "."
 End If
 lcMessage              = lcMessage + Chr$( 13) + "Please note down
error message."
note "lcmessage = " + lcMessage  '(2)

 If tlAsk then
note "ASK"
         llContinue     = ASK( lcMessage + Chr$(13) + "Do you wish to
Continue or Quit mPlan Maps?", "Continue", "Quit")
 Else
note "Don't ASK"
         Note lcMessage
 End If
note "llcontinue = " + llcontinue

 ERROR_REPORT           = llContinue
End Function 

----------------------------------------------------
From: Driver, Greg 9434 [mailto:[EMAIL PROTECTED]
Sent: 19 May 2006 09:31
To: Terry McDonnell
Subject: RE: [MI-L] OnError Command



Hi Terry, 

I can't see any problems with the code you've included and so may be the
problem is within the ERROR_REPORT code?  If there is a problem in the
code then this will explain why it's bombing out otherwise you code
should handle the error and then resume at the ERR_RESUME label.

Cheers 

Greg Driver 


_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to