summaryrefslogtreecommitdiff
path: root/lockfile/error.rs
diff options
context:
space:
mode:
authorYiyu Lin <linyiyu1992@gmail.com>2023-03-14 22:55:52 +0800
committerGitHub <noreply@github.com>2023-03-14 10:55:52 -0400
commit96b1ede254cfca3bbb1741adb653975789605290 (patch)
tree9bdef4da1b111eded90e9c754c3f8682693b4e69 /lockfile/error.rs
parent8d412f6412457898b03e412137565f8b2f1f073c (diff)
refactor(lockfile): move `anyhow` to `thiserror` (#18178)
Diffstat (limited to 'lockfile/error.rs')
-rw-r--r--lockfile/error.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/lockfile/error.rs b/lockfile/error.rs
new file mode 100644
index 000000000..361303316
--- /dev/null
+++ b/lockfile/error.rs
@@ -0,0 +1,15 @@
+// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
+
+use thiserror::Error;
+
+#[derive(Debug, Error)]
+pub enum LockfileError {
+ #[error(transparent)]
+ Io(#[from] std::io::Error),
+
+ #[error("Unable to read lockfile: \"{0}\"")]
+ ReadError(String),
+
+ #[error("Unable to parse contents of lockfile: \"{0}\"")]
+ ParseError(String),
+}