Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Brad Wood
Brad WoodNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
Created 11 August 2022 at 18:53
Updated 20 September 2024 at 20:28
I’ve only tested this so far with MS SQL, but Adobe differs here and Lucee behavior is misleading. If a query has more than one statement, and the first statement (whether a select or an update, etc) is successful, but a later statement raises an exception, Adobe will throw the exception, but Lucee will completely ignore it as though it never happened.
These two examples work on MS SQL Server:
or this one
In both cases, Adobe CF will throw the error. Lucee will totally ignore it and you’ll think your code is running fine!
It doesn’t have to be a raiseError() statement. I fist noticed this with a normal INSERT query that was blowing up due to a type issue but I couldn’t figure out why it wasn’t running. It was something like this
The insert was blowing up, but we had no idea because the update on top of it was successful and that’s what Lucee was looking at. My assumption is that the JDBC result is sending back information about each of the statements in the batch and Lucee needs to be looking at all of them, not just the first one to check for any exceptions.
Furthermore, if I run this code in Adobe
Then Adobe reports ALL of the exceptions as nested errors. The outermost one is the first to be thrown (boom1) and the inner most exception is “boom3”.