go-qml / qml

QML support for the Go language
Other
1.96k stars 187 forks source link

Turn panics into javascript exceptions? #69

Open quarnster opened 10 years ago

quarnster commented 10 years ago

Would it be possible to catch panic's and convert them into a javascript exception instead?

This is mostly with #68 in mind where the panic originates in go-qml before it reaches "my" code, but it got me thinking that it'd be nice if any panics occuring in my code would also be converted into a javascript exception when the initiating call originates from a QML file.

niemeyer commented 10 years ago

It might make sense to just log panics rather than crashing the whole application. I'll keep this open for us to reconsider it after the v1 work stabilizes a bit.

For #68, we should just fix it and be done, though.