Skip to content

Announce failed query executions without changing exceptions - #337

Merged
elpete merged 4 commits into
nextfrom
feat/query-failure-hook
Oct 4, 2026
Merged

elpete merged 4 commits into
nextfrom
feat/query-failure-hook

Conversation

@elpete

@elpete elpete commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Query execution failures now announce onQBExecuteException with the original exception, execution context, and elapsed time, then rethrow that same exception. Failure observers and their diagnostic logger cannot replace it; pretend queries and successful execution hooks remain compatible. The hook reuses the capability flag initialized by preQBExecute without repeating the param.

Exception-preservation tests compare native exception objects by identity and CFML catch structs by their contents. Structural comparison cannot iterate native BoxLang exceptions, while CFML engines can produce separate catch wrappers for the same rethrown exception. Both representations retain the original failure checks.

Validation: all four focused TestBox specs pass on native BoxLang 1.18.0+66, with bx-compat-cfml 1.40.0 enabled, and on Lucee 6.2.8.20. They cover original exception preservation, observer diagnostics, diagnostic logger failure isolation, processState compatibility, and pretend-query behavior. Formatting and whitespace checks passed. The complete qb suite and engine matrix were not rerun locally for this assertion-only follow-up.

Documentation lives in ortus-docs/qb-docs#46; this code PR contains no README documentation addition.

This preview supplies caught-query failure coverage for coldbox-modules/sentry#49. It is based on the verified v14.0.2 commit and uses version 14.0.3-alpha.1 for isolated consumer validation.

@elpete
elpete merged commit 5329b67 into next Oct 4, 2026
35 checks passed
@elpete
elpete deleted the feat/query-failure-hook branch October 4, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant