Quantcast
Channel: Lucee Dev - Latest topics
Viewing all articles
Browse latest Browse all 421

getPageContext().getCurrentLineNo()

$
0
0

Hi Gang,

Using Lucee 5.4.latest

In our code we have the following;

getEmailService().emailNewMessage(
				'webdev@centracx.com',
				'transferModel.cfc problem - #createObject("java", "java.net.InetAddress").localhost.getCanonicalHostName()#',
				'Hi there,' & Chr(10) & Chr(13) & Chr(10) & Chr(13) &
				'#GetCurrentTemplatePath()# #getPageContext().getCurrentLineNo()#' & Chr(10) & Chr(13) & Chr(10) & Chr(13) &
				'Something missing from passedStruct.' & Chr(10) & Chr(13)
			);

I have never seem this portion of our code executed;
In that I have never received an error email that with those contents.
But at some stage - It obviously did work.

Nonethless, I received an Error Email overnight, complaining that the method;

getPageContext().getCurrentLineNo()
does not exist.

I have dumped the PageContext object and sure enough - it does not exist.
Which is fine.
(Perhaps the original code is from using ACF or Railo - I have no idea)

Some google-fu, found this link

Which I might be able to hack up to give me just the current line number without the whole stack trace.
But before I went down that path - I thought I would ask if anyone knew of a CFML BIF that I might use as simply as the original code getPageContext().getCurrentLineNo()

As Always thanks!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 421

Trending Articles