> I notice the line number is given in the error scope.
> 
> Does anyone happen to know whether its possible to grab the 
> line number without throwing (and recovering from) an error?
> 
> I.E.  Something like this
> 
> 7.    
> 8.
> 9.    <CFOUTPUT>
> 10.   #getCurrentLineNumber()#
> 11.   </CFOUTPUT>
> 12.
> 13.
> 
> ....outputs:
> 
> 10

I don't think there's anything built-in to do this - it's figured out by the
compiler, I think.

However, you could probably write a function or custom tag that (very
inefficiently) uses CFFILE to read the file in question, find the number of
lines in the file up to the point of that tag, and displays that number.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236948
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to