diff options
Diffstat (limited to 'crates/shirabe/src/downloader')
| -rw-r--r-- | crates/shirabe/src/downloader/filesystem_exception.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/shirabe/src/downloader/filesystem_exception.rs b/crates/shirabe/src/downloader/filesystem_exception.rs index ddea31f..f861306 100644 --- a/crates/shirabe/src/downloader/filesystem_exception.rs +++ b/crates/shirabe/src/downloader/filesystem_exception.rs @@ -1 +1,15 @@ //! ref: composer/src/Composer/Downloader/FilesystemException.php + +use shirabe_php_shim::Exception; + +#[derive(Debug)] +pub struct FilesystemException(pub Exception); + +impl FilesystemException { + pub fn new(message: String, code: i64) -> Self { + FilesystemException(Exception { + message: format!("Filesystem exception: \n{}", message), + code, + }) + } +} |
