Skip to content

fix(usb): Add error handling for serial write operations#4318

Merged
jamesarich merged 2 commits into
mainfrom
fix/usbserial-write
Jan 26, 2026
Merged

fix(usb): Add error handling for serial write operations#4318
jamesarich merged 2 commits into
mainfrom
fix/usbserial-write

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Error handling for usb serial write

This commit adds a `try-catch` block around the `writeAsync` call in `SerialConnectionImpl` to prevent crashes when writing to the USB serial port fails.

It specifically handles `BufferOverflowException` and other generic `Exception` types, logging the error instead of allowing the app to crash.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich enabled auto-merge January 26, 2026 12:35
@github-actions github-actions Bot added the bugfix PR tag label Jan 26, 2026
@codecov

codecov Bot commented Jan 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (a28aa4d) to head (1913739).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4318   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          3       3           
  Lines         28      28           
  Branches       8       8           
=====================================
  Misses        28      28           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesarich jamesarich added this pull request to the merge queue Jan 26, 2026
Merged via the queue into main with commit 28cf2b1 Jan 26, 2026
11 checks passed
@jamesarich jamesarich deleted the fix/usbserial-write branch January 26, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant