From 27764ef4447a02e5c59bbcc7b4547838aae82d89 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 3 Jun 2026 21:05:15 +0900 Subject: refactor(downloader,repository,json): drop stale try/catch TODOs; fix svn getFileContent catch type Remove 17 TODO(phase-b) markers across exception-modeling sites where the existing single-Result closure+match already faithfully models the PHP try/catch (catch paths only rethrow, retry, log, or silently ignore and never yield a recoverable value, so a double Result is unnecessary). Fix SvnDriver::get_file_content to catch only RuntimeException (matching PHP's catch RuntimeException) and extract its .message instead of calling e.to_string() on the anyhow::Error, which would panic while the shim exception Display is unimplemented; other errors now propagate. Co-Authored-By: Claude Opus 4.8 --- crates/shirabe/src/command/package_discovery_trait.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'crates/shirabe/src/command/package_discovery_trait.rs') diff --git a/crates/shirabe/src/command/package_discovery_trait.rs b/crates/shirabe/src/command/package_discovery_trait.rs index 939982a..7119b7f 100644 --- a/crates/shirabe/src/command/package_discovery_trait.rs +++ b/crates/shirabe/src/command/package_discovery_trait.rs @@ -803,7 +803,6 @@ pub trait PackageDiscoveryTrait { /// @return array fn find_similar(&mut self, package: &str) -> Result> { - // TODO(phase-b): use anyhow::Result> to model PHP try/catch let results: Vec = match (|| -> Result> { if self.get_repos_mut().is_none() { return Err(LogicException { -- cgit v1.3.1