[GH-ISSUE #37] Wrap all native callbacks with try/catch to give more details about errors. #17

Closed
opened 2026-05-05 10:59:24 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @pauldotknopf on GitHub (Jul 24, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/37

.NET exceptions don't travel along PInvoke boundaries. The entire app just SIG quits.

We should try{}catch(Exception ex){} all .NET callbacks that are passed to native world, write the exceptions details to stdout, and then rethrow.

Originally created by @pauldotknopf on GitHub (Jul 24, 2018). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/37 .NET exceptions don't travel along PInvoke boundaries. The entire app just SIG quits. We should ```try{}catch(Exception ex){}``` all .NET callbacks that are passed to native world, write the exceptions details to stdout, and then rethrow.
Author
Owner

@pauldotknopf commented on GitHub (Jul 24, 2018):

Even better yet, our callbacks should support an error return code. That way, native code can handle it properly.

<!-- gh-comment-id:407533470 --> @pauldotknopf commented on GitHub (Jul 24, 2018): Even better yet, our callbacks should support an error return code. That way, native code can handle it properly.
Author
Owner

@pauldotknopf commented on GitHub (Feb 6, 2019):

Closing in favor of #104

<!-- gh-comment-id:460941332 --> @pauldotknopf commented on GitHub (Feb 6, 2019): Closing in favor of #104
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#17
No description provided.