Refactor all (except command) modules using new exceptions

This commit is contained in:
crazywhalecc
2025-08-06 20:43:23 +08:00
committed by Jerry Ma
parent 722bb31815
commit f68f060be2
47 changed files with 335 additions and 291 deletions

View File

@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace SPC\util;
use SPC\exception\RuntimeException;
use SPC\exception\ExecutionException;
/**
* Utility class for pkg-config operations
@@ -95,7 +95,7 @@ class PkgConfigUtil
{
f_exec($cmd, $output, $result_code);
if ($result_code !== 0) {
throw new RuntimeException("pkg-config command failed with code {$result_code}: {$cmd}");
throw new ExecutionException($cmd, "pkg-config command failed with code: {$result_code}");
}
return implode("\n", $output);
}