catch(Any e) {
if ( e.NativeErrorCode EQ "2601") //Cannot insert duplicate key row
{
// do something
} else {
rethrow;
}
}
--
Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit https://ti.to/cfcamp/cfcamp-2016/discount/Lucee@cfcamp
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/ff864e80-9763-4e1d-91a2-12c0d89c348e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
writedump(e.getCause());
writedump(e.getSuppressed());
<cfscript>
try {
activationCode = "B5FB4CACC332D842EF99BB06CE1DAA35";
machineID = "TESTMACHINE1";
act = EntityNew("Activation");
sn = EntityLoadByPK("SerialNumber", 196941);
act.setMachineID(machineID);
act.setActivationCode(activationCode);
act.setDateCreated(now());
act.setActivationStatusID(1);
act.setLastName("");
act.setEmail("");
act.setSerialNumber(sn);
act.save();
} catch (Any e)
{
writeDump(StructKeyList(e));
//on ACF: "Suppressed,RootCause,StackTrace,Detail,Message,Cause,Type,TagContext"
//on Lucee: "Extended_Info,Message,Detail,additional,TagContext,ErrorCode,type,StackTrace,ExtendedInfo"
//writeDump(var=e, format="html");
writeDump(var=e.getCause(), label="getCause");
writeDump(var=e.getSuppressed(), label="getSuppressed");
}
</cfscript>