Debian Codegraph @

third_party/rust/firefox-versioning/src/error.rs

raw
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 /// The `VersioningError` indicates that a Firefox Version, being passed down as a `String`,
6 /// cannot be parsed into a `Version`.
7 ///
8 /// It can either be caused by a non-ASCII character or a integer overflow.
9 #[derive(Debug, PartialEq, thiserror::Error)]
10 pub enum VersionParsingError {
11 /// Indicates that a number overflowed.
12 #[error("Overflow Error: {0}")]
13 Overflow(String),
14 /// Indicates a general parsing error.
15 #[error("Parsing Error: {0}")]
16 ParseError(String),
17 }