Skip to content

Narrow catch blocks in DebuggerInfoTable to ReadException#1081

Merged
xusheng6 merged 1 commit into
devfrom
refactor-narrow-readpointer-catch
May 14, 2026
Merged

Narrow catch blocks in DebuggerInfoTable to ReadException#1081
xusheng6 merged 1 commit into
devfrom
refactor-narrow-readpointer-catch

Conversation

@xusheng6
Copy link
Copy Markdown
Member

Summary

  • Follow-up to Catch BinaryReader exceptions when reading stack variable parameters #1079: replace catch (...) with catch (const ReadException&) in the three try blocks added around BinaryReader::Seek + ReadPointer.
  • BinaryNinja::ReadException (binaryninjaapi.h:8780) is the specific exception both APIs throw, so the narrow catch documents intent and lets unrelated failures (allocation errors, etc.) propagate where they can be diagnosed.

Test plan

🤖 Generated with Claude Code

Per review feedback on #1079: catch the specific exception type
(BinaryNinja::ReadException) instead of catch (...) when the throwing
API is known. The original catch-all could swallow unrelated failures
and hide intent. ReadException is the only exception BinaryReader::Seek
and ReadPointer raise here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@xusheng6 xusheng6 self-assigned this May 14, 2026
@xusheng6 xusheng6 added this to the Jotunheim Release 2 milestone May 14, 2026
@xusheng6 xusheng6 merged commit e2b7467 into dev May 14, 2026
1 check passed
@xusheng6 xusheng6 deleted the refactor-narrow-readpointer-catch branch May 14, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant