Thanks guys. Certainly, compiling the code and checking for errors
would be the ideal - just need to make sure the code does not execute.
Any ideas about an explicit way to do that? I've thought of a hack,
roughly:

function checkSyntax( templatePath ){

 var content = '<cfif "ColdFusion" EQ "Rocks">' & fileRead(
arguments.templatePath ) & '</cfif>';
 FileWrite('/some/tmp/file', content);
 try{
include '/some/tmp/file';
fileDelete('/som/tmp/file');
} catch(any e){
 return false;
}

return true;


}

d

On 6 August 2010 22:35, denstar <valliants...@gmail.com> wrote:
>
> If I'm understanding right, you could compile the code and it should
> throw an error if there's a validation problem.
>
> But I might not be understanding correctly.
>
> :Den
>
> --
> Of two pleasures, if there be one which all or almost all who have
> experience of both give a decided preference, irrespective of any
> feeling of moral obligation to prefer it, that is the more desirable
> pleasure.
> John Stuart Mill
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336116
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to