This is my standard CATCH block. The error object created by the CATCH has that
info. I don't remember where I pinched this from or I'd give credit where
credit is due; probably one of the Hentzenwerke "What's New In... " books. You
didn't indicate if this is in the runtime or dev environment. If the former,
you need to make sure your EXE is built with debug info included if you want a
line number.
TRY
Some code here...
CATCH TO m.loError
#DEFINE CRLF CHR(13)+CHR(10)
#DEFINE MB_OK 0
#DEFINE MB_ICONSTOP 16
LOCAL m.lcError AS Character
m.lcError=[ Error: ] + STR(m.loError.ErrorNo) + CRLF
m.lcError=m.lcError+[ LineNo: ] + STR(m.loError.LineNo) + CRLF
m.lcError=m.lcError+[ Message: ] + m.loError.Message + CRLF
m.lcError=m.lcError+[ Procedure: ] + m.loError.Procedure + CRLF
m.lcError=m.lcError+[ Details: ] + m.loError.Details + CRLF
m.lcError=m.lcError+[ StackLevel: ] + STR(m.loError.StackLevel) + CRLF
m.lcError=m.lcError+[ LineContents: ] + m.loError.LineContents
MESSAGEBOX(m.lcError,MB_OK+MB_ICONSTOP,[*ERROR*])
FINALLY
ENDTRY
--
rk
-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of
Michael Madigan
Sent: Tuesday, October 02, 2012 6:34 AM
To: [email protected]
Subject: Line numbers in error handler
If an error occurred in FPW 2.6, the line no would correspond to the screen's
.SPR program
What file do I look at when I get an error with a line no in VFP 9.0?
I've been looking in the methods but none of the line numbers seem to really
match up with the type of error I am receiving.
--- StripMime Report -- processed MIME parts --- multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD04421726AA1C5@ACKBWDDQH1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.