Fix crash when event does not have `Add` method and improve message for some other internal errors by lostmsu · Pull Request #2409 · pythonnet/pythonnet
Repository navigation
Fix crash when event does not have Add method and improve message for some other internal errors - #2409
Merged
filmor merged 3 commits into pythonnet:master from losttech:InternalError Jul 2, 2024
Merged
Fix crash when event does not have Add method and improve message for some other internal errors #2409
filmor merged 3 commits into
pythonnet:master from
losttech:InternalError
Conversation
lostmsu commented Jul 1, 2024
Copy link Copy Markdown
Member
What does this implement/fix? Explain your changes.
- Fixes crash on events with no
AddMethod - Adds
InternalPythonnetExceptionthat can tell user what .NET type caused failure if an unexpected internal error occurs
Does this close any currently open issues?
Checklist
Check all those that are applicable and complete.
- Updated the
CHANGELOG
not all events have Add method
790b7c8
fixes pythonnet#2405
give users some idea of why we might be unable to reflect .NET types ...
dfb46a6
...to Python for them
mentioned event Add method crash fix in changelog
772fa05
lostmsu
force-pushed
the
InternalError
branch
from
4c0c6b2 to
772fa05
Compare
July 1, 2024 22:09
filmor commented Jul 2, 2024
Copy link Copy Markdown
Member
|
As said, while looking mildly prettier, this still renders the library completely useless in this case. I don't think there is any valid reason for us to bail out on init just because a single type is not loaded properly. So, sure, we can merge this, but we can not claim that it fixes the reported issue. |
lostmsu commented Jul 2, 2024 · edited Loading
Copy link Copy Markdown
Member
Author
|
@filmor the fix is the new null check in The rest is to make it easier to do bug reports: the error data will now at least contain the name of the type that we failed to process. |
View reviewed changes
filmor commented Jul 2, 2024
Copy link Copy Markdown
Member
|
I see. Still don't see why making |
9ebfbde
into
pythonnet : master
Jul 2, 2024
lostmsu commented Jul 2, 2024
Copy link Copy Markdown
Member
Author
|
@filmor it does not swallow the error. The checks on methods and fields are different. They actually check that method or field was passed, and not just BTW I was unable to reproduce it with C#. |
Bot
mentioned this pull request Jan 16, 2026 Bump pythonnet from 3.0.3 to 3.0.5 mattemangia/Deep3DStudio#99 Closed Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment