Replace all production unwrap()/expect() with proper error handling#93
Open
Replace all production unwrap()/expect() with proper error handling#93
Conversation
…uction code Replace all .unwrap() and .expect() calls in non-test code with proper error propagation using ok_or_else, map_err, if-let-err, and match patterns. Changes span ssh proxy I/O, vault header parsing, Lua API host bridge helpers, JVM plugin manager, IPC socket setup, locale initialization, and theme watcher thread spawning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Eliminates all
.unwrap()and.expect()calls in non-test production code across the workspace. Each is replaced with proper error propagation (?),ok_or_else, or graceful logging.12 files changed:
conch_remote/ssh.rs— proxy stdin/stdout →RemoteError::Connectionconch_tauri/remote/server_commands.rs— dialog paths →ok_or_elseconch_vault/encryption.rs— byte slice conversion →VaultError::Corruptedconch_plugin/lua/api/{mod,app,session,ui}.rs—with_acc/with_host_apireturnLuaResultinstead of panickingconch_plugin/jvm/runtime.rs— JVM state →LoadErrorconch_tauri/{ipc,platform,watcher}.rs— thread spawn/CString → graceful fallbacksType of change
Testing