except sample: catch the string type that is actually thrown (PR #26917)

9 views
Skip to first unread message

Gunter Königsman

unread,
Aug 25, 2026, 7:56:49 AM (2 days ago) Aug 25
to wx-...@googlegroups.com, Subscribed

When porting wxWidgets to GTK4 Claude reckons to have found 6 bugs in wxWidgets that hinder samples, example applications or tests from working. To me as a casual outsider the patches look like actually resolving existing bugs. I currently push them as separate pull requests so they can be individually reviewed.

This pull request resolves the issue that trying to issue a string-type exception in the exception sample causes an assert about an unknown string type.

MyFrame::ProcessEvent() catches

catch ( const wxChar *msg )

but the string thrown by the sample is a const char*, so in a build where wxChar is wchar_t the handler never matches and the exception escapes to the outer handler instead of demonstrating what it is there to demonstrate.

Catch const char* and convert explicitly for the log message.

(cherry picked from commit 8511f2f)


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26917

Commit Summary

  • 3801b4d except sample: catch the string type that is actually thrown

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26917@github.com>

VZ

unread,
Aug 26, 2026, 11:17:49 AM (22 hours ago) Aug 26
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26917)

This is definitely right, thanks.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26917/c5427402909@github.com>

VZ

unread,
Aug 26, 2026, 1:29:19 PM (20 hours ago) Aug 26
to wx-...@googlegroups.com, Subscribed

Closed #26917 via 5505ecc.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26917/issue_event/30058103731@github.com>

Reply all
Reply to author
Forward
0 new messages