Skip to content

Android: log full exceptions instead of just their message - #31

Merged
ofalvai merged 1 commit into
masterfrom
push-umnqnrtlwsoz
Aug 17, 2026
Merged

Android: log full exceptions instead of just their message#31
ofalvai merged 1 commit into
masterfrom
push-umnqnrtlwsoz

Conversation

@ofalvai

@ofalvai ofalvai commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Part of a list of quick tactical logging fixes.

Several catch blocks called CodePushUtils.log(String) with only e.getMessage(), even though the exception object was already in hand. That silently drops the stack trace from logcat, since only CodePushUtils.log(Throwable) actually prints it (via Log.e). Switch those sites to log the Throwable itself, preserving the original context in a wrapping message where one existed.

Several catch blocks called CodePushUtils.log(String) with only
e.getMessage(), even though the exception object was already in hand.
That silently drops the stack trace from logcat, since only
CodePushUtils.log(Throwable) actually prints it (via Log.e). Switch
those sites to log the Throwable itself, preserving the original
context in a wrapping message where one existed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Android error logging to preserve stack traces and exception causes.

Changes:

  • Logs malformed-data exceptions directly.
  • Wraps reflective bundle-loading failures with contextual messages and causes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
CodePushNativeModule.java Preserves stack traces in bundle-loading error logs.
CodePush.java Logs malformed package-data exceptions directly.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ofalvai
ofalvai marked this pull request as ready for review August 17, 2026 09:09
@ofalvai
ofalvai merged commit b06944d into master Aug 17, 2026
4 of 6 checks passed
@ofalvai
ofalvai deleted the push-umnqnrtlwsoz branch August 17, 2026 09:25
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.

4 participants