CF7 already has the ability to do most of this:
<cfset nullValue = JavaCast("null","") /> <cfif not structKeyExists(variables,'nullValue')> Null Value found. </cfif>
The only thing it doesn't support is returning a null instead of say a struct or a query.
i think javacast is a special case. you can test for the existence of "nullValue" ok but this sort of thing below bombs. nulledVar is like long gone as far as cf is concerned, even to the catch bits. that output throws an undefined error. or something funky about catch scope, etc.
<cfscript>
try {
nulledVar=someJavaObjectThatCanReturnNull();
}
catch (Any e) {
nulledVar="something";
}
writeoutput("#nulledVar#");
</cfscript>
---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
