Yes, I am using ORM. Here is a stripped down test case
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");
}
That runs fine on ACF. On Lucee 5 it errors on e.getCause() with “No
matching Method/Function for Struct.getCause() found” and similar error for
getSuppressed.
Thanks,
PhilOn Wednesday, August 31, 2016 at 8:45:29 AM UTC-7, Jesse Shaffer wrote:
It also looks like you’re using ORM. ACF appears to be passing through
the JDBC exception, while Lucee is wrapping it in an Application exception.
Just as an experiment - can you try this on Lucee:
writedump(e.getCause());
writedump(e.getSuppressed());
On Wednesday, August 31, 2016 at 10:35:31 AM UTC-5, Phil Cruz wrote:
It’s “application”
http://www.screencast.com/t/HnQaQGCbm
-Phil
On Wednesday, August 31, 2016 at 8:33:55 AM UTC-7, Jesse Shaffer wrote:
What is the “type” on the lucee exception? It is not visible from the
screenshot.
On Tuesday, August 30, 2016 at 11:10:46 AM UTC-5, Phil Cruz wrote:
I’m doing a try/catch around some code that inserts to the db. The
catch looks like
catch(Any e) {
if ( e.NativeErrorCode EQ “2601”) //Cannot insert duplicate key row
{
// do something
} else {
rethrow;
}
}
This works in ACF but fails in Lucee 5. When I dump the exception I see
they are quite different.
http://www.screencast.com/t/eQObJKJcEE
Is that a bug?
Thanks,
Phil