L
Laura Stern
Guest
This isn't really about QUERY-PREPARE per se. It is just that QUERY-PREPARE is a handle method. Like many handle methods, if there is an error, the AVM does not raise error but treats it like a warning. So you do get an error message but ERROR-STATUS:ERROR is false. We were not happy about this behavior but couldn't just change it wholesale or we would break people's code. But we did modify it when we introduced structured error handling. If your block now uses structure error handling, this will behave differently. It WILL raise error and ERROR-STATUS:ERROR will be true if you use NO-ERROR. Or if you have a CATCH block the error will be caught. Having structured error handling on the block means either that you have a CATCH block or that the UNDO, THROW option is in effect for the block either because it is coded on the block (ON ERROR UNDO, THROW), or you are using either ROUTINE-LEVEL ON ERROR UNDO, THROW or BLOCK-LEVEL ON ERROR UNDO, THROW and it applies to the block you are in.
Continue reading...
Continue reading...