mithlond
06/16/2022, 3:06 PMwebsolete
06/16/2022, 3:07 PM/**
* This function will convert a read-only struct to a writable one. In CF10, this is necessary for read-only CFCATCH objects if you want to manipulate them.
*
* @data any The "object" to convert to a normal struct
*
* @return struct
*/
public struct function toRegularStruct(required any data) {
// Just copy the passed in structure's elements into a new/normal struct object
return structFilter(arguments.data, function() {
return true;
});
}
websolete
06/16/2022, 3:07 PMmithlond
06/16/2022, 3:08 PMAdam Cameron
mithlond
06/16/2022, 5:33 PMDave Merrill
06/16/2022, 5:42 PMAdam Cameron
coldfusion.runtime.CustomException
when one goes throw "something"
, Lucee throws a (shockingly poorly named) lucee.runtime.exp.CatchBlockImpl
.
Also coldfusion.runtime.CustomException
is final
, so no extending anyhow.
That said, one could easily knock together one's own custom exceptions in Java. It does require doing Java (and I know a lot of CFMLers are allergic to pushing that particular boat out), but the Java knowledge required is minimal.