diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-09 11:15:55 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-09 11:15:55 +0900 |
| commit | 64e02ef08f0f479937fc194f79eac997327a79dd (patch) | |
| tree | c32eab75e60f300242b65296937cb3ceffbe02b1 /crates/shirabe-symfony-filesystem/src/exception/io_exception.rs | |
| parent | 446f719f6c34453f027d5ccdbf81b16e63f4c982 (diff) | |
| download | php-shirabe-64e02ef08f0f479937fc194f79eac997327a79dd.tar.gz php-shirabe-64e02ef08f0f479937fc194f79eac997327a79dd.tar.zst php-shirabe-64e02ef08f0f479937fc194f79eac997327a79dd.zip | |
refactor(symfony-filesystem): extract symfony/filesystem into the shirabe-symfony-filesystem crate
Move `Symfony\Component\Filesystem` out of shirabe-external-packages and
into its own crate, so the path is
`shirabe_symfony_filesystem::Filesystem` instead of
`shirabe_external_packages::symfony::filesystem::Filesystem`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-symfony-filesystem/src/exception/io_exception.rs')
| -rw-r--r-- | crates/shirabe-symfony-filesystem/src/exception/io_exception.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/crates/shirabe-symfony-filesystem/src/exception/io_exception.rs b/crates/shirabe-symfony-filesystem/src/exception/io_exception.rs new file mode 100644 index 00000000..07a189c3 --- /dev/null +++ b/crates/shirabe-symfony-filesystem/src/exception/io_exception.rs @@ -0,0 +1,29 @@ +//! ref: composer/vendor/symfony/filesystem/Exception/IOException.php + +use shirabe_php_shim::RuntimeException; + +#[derive(Debug)] +pub struct IOException { + inner: RuntimeException, + pub path: Option<String>, +} + +impl IOException { + pub fn new( + message: String, + code: i64, + previous: Option<std::sync::Arc<anyhow::Error>>, + path: Option<String>, + ) -> Self { + Self { + inner: RuntimeException::with_code_and_previous(message, code, previous), + path, + } + } +} + +shirabe_php_shim::impl_php_exception!( + IOException, + inner, + r"Symfony\Component\Filesystem\Exception\IOException" +); |
