diff options
Diffstat (limited to 'vendor/spdx-rs/src/error.rs')
-rw-r--r-- | vendor/spdx-rs/src/error.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/spdx-rs/src/error.rs b/vendor/spdx-rs/src/error.rs new file mode 100644 index 000000000..ae6c4b4e1 --- /dev/null +++ b/vendor/spdx-rs/src/error.rs @@ -0,0 +1,33 @@ +// SPDX-FileCopyrightText: 2021 HH Partners +// +// SPDX-License-Identifier: MIT + +use std::io; +use thiserror::Error; + +#[derive(Debug, Error)] +pub enum SpdxError { + #[error("Error parsing the SPDX Expression.")] + Parse { + #[from] + source: spdx_expression::SpdxExpressionError, + }, + + #[error("Path {0} doesn't have an extension.")] + PathExtension(String), + + #[error("Error with file I/O.")] + Io { + #[from] + source: io::Error, + }, + + #[error("Error while parsing date.")] + DateTimeParse { + #[from] + source: chrono::ParseError, + }, + + #[error("Error parsing tag-value: {0}")] + TagValueParse(String), +} |