aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs')
-rw-r--r--crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs
index 3ffcc9c..a5f2844 100644
--- a/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs
+++ b/crates/shirabe-external-packages/src/symfony/component/filesystem/exception/io_exception.rs
@@ -5,6 +5,21 @@ pub struct IOException {
pub path: Option<String>,
}
+impl IOException {
+ pub fn new(
+ message: String,
+ code: i64,
+ _previous: Option<Box<dyn std::error::Error + Send + Sync>>,
+ path: Option<String>,
+ ) -> Self {
+ Self {
+ message,
+ code,
+ path,
+ }
+ }
+}
+
impl std::fmt::Display for IOException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.message)