Dialog Plugin - callback errors not handled globally #17871
Labels
area/plugins
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
Errors thrown in async callbacks (
onOk
,onCancel
oronDismiss
) don't trigger Vue’s globalerrorHandler
. Additionally, errors thrown in synchronous callbacks (onOk
oronCancel
) preventonDismiss
from being called, but at least these errors are handled by the globalerrorHandler
.What did you expect to happen?
I expected errors from the Dialog plugin callbacks to be caught by the global
errorHandler
. Currently, I have to wrap the callbacks in a try-catch block with a global error-handling mechanism. While it might be reasonable for errors from synchronous callbacks to abortonDismiss
, async callbacks, in my opinion, should be handled globally. Ideally, regardless of whether they are synchronous or asynchronous, all callbacks should run independently of each other, and their errors should be handled globally.Reproduction URL
https://jsfiddle.net/23h7pao8/
How to reproduce?
errorHandler
.onDismiss
is not triggered.onOk
/onCancel
and another fromonDismiss
. However, the errors are never handled globally.Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Plugins (quasar)
Platforms/Browsers
No response
Quasar info output
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: