Skip to content

refactor: replace panics with proper error propagation#12

Open
duna-feline wants to merge 1 commit intomainfrom
fix/error-handling
Open

refactor: replace panics with proper error propagation#12
duna-feline wants to merge 1 commit intomainfrom
fix/error-handling

Conversation

@duna-feline
Copy link
Copy Markdown
Collaborator

Changes

  • Add UnsupportedFormat(String) error variant
  • Replace unimplemented!() with Err(Error::UnsupportedFormat(...)) in file_utils.rs
  • Replace .write().unwrap() with ? propagation
  • Replace .unwrap_or_else(|| panic!(...)) with .ok_or_else(|| Error::...)? in path_utils.rs
  • Replace .unwrap() in copy_object_file with proper error handling
  • Fix panic-prone glob handling in llvm_utils.rs

Why

Library code should never panic. All error paths now return Result so callers can handle failures gracefully.

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