about summary refs log tree commit diff
path: root/tvix/derivation/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/derivation/src/errors.rs')
-rw-r--r--tvix/derivation/src/errors.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/tvix/derivation/src/errors.rs b/tvix/derivation/src/errors.rs
index baf1d6ca5398..75b101efddae 100644
--- a/tvix/derivation/src/errors.rs
+++ b/tvix/derivation/src/errors.rs
@@ -13,9 +13,8 @@ pub enum DerivationError {
     MoreThanOneOutputButFixed(),
     #[error("Invalid output name for fixed-output derivation: {0}.")]
     InvalidOutputNameForFixed(String),
-    #[error("Unable to parse path of output {0}: {1}.")]
-    InvalidOutputPath(String, ParseStorePathError),
-
+    #[error("Unable to validate output {0}: {1}.")]
+    InvalidOutput(String, OutputError),
     // input derivation
     #[error("Unable to parse input derivation path {0}: {1}.")]
     InvalidInputDerivationPath(String, ParseStorePathError),
@@ -42,3 +41,10 @@ pub enum DerivationError {
     #[error("Invalid environment key {0}")]
     InvalidEnvironmentKey(String),
 }
+
+/// Errors that can occur during the validation of a specific [Output] of a [Derviation].
+#[derive(Debug, Error)]
+pub enum OutputError {
+    #[error("Invalid ouput path {0}: {1}")]
+    InvalidOutputPath(String, ParseStorePathError),
+}