In Compose HTML, I want to add central error handling so that I no longer get the 'Uncaught runtime errors' page, but can show a neat error message.
Anyone an idea how to implement this? (edited)
fun handleError(di:DI, message:String) {
// store message in sessionStorage
...
CoroutineScope(Dispatchers.Main).launch {
// save data to server or indexedD
...
// redirect to error page
window.location.href = "/error.html"
}
}
But this will still show the default "Uncaught runtime errors" page for a second or so.
It would be nice if we could overrule the default runtime error handling of Compose HTML.