dia_semver/semver/parse_errors.rs
1/*
2==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
3
4Dia-Semver
5
6Copyright (C) 2018-2022 Anonymous
7
8There are several releases over multiple years,
9they are listed as ranges, such as: "2018-2022".
10
11This program is free software: you can redistribute it and/or modify
12it under the terms of the GNU Lesser General Public License as published by
13the Free Software Foundation, either version 3 of the License, or
14(at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19GNU Lesser General Public License for more details.
20
21You should have received a copy of the GNU Lesser General Public License
22along with this program. If not, see <https://www.gnu.org/licenses/>.
23
24::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--
25*/
26
27//! # Parse error messages
28//!
29//! These are error messages while parsing [`Semver`][struct:Semver].
30//!
31//! [struct:Semver]: ../struct.Semver.html
32
33macro_rules! err_prefix { () => { "parser:" }}
34
35/// # Empty string
36pub const EMPTY: &str = concat!(err_prefix!(), "empty");
37
38/// # Invalid major
39pub const INVALID_MAJOR: &str = concat!(err_prefix!(), "invalid-major");
40
41/// # Invalid minor
42pub const INVALID_MINOR: &str = concat!(err_prefix!(), "invalid-minor");
43
44/// # Missing minor
45pub const MISSING_MINOR: &str = concat!(err_prefix!(), "missing-minor");
46
47/// # Invalid patch
48pub const INVALID_PATCH: &str = concat!(err_prefix!(), "invalid-patch");
49
50/// # Missing patch
51pub const MISSING_PATCH: &str = concat!(err_prefix!(), "missing-patch");
52
53/// # Invalid token
54pub const INVALID_TOKEN: &str = concat!(err_prefix!(), "invalid-token");
55
56/// # Invalid pre-release
57pub const INVALID_PRE_RELEASE: &str = concat!(err_prefix!(), "invalid-pre-release");
58
59/// # Invalid build metadata
60pub const INVALID_BUILD_METADATA: &str = concat!(err_prefix!(), "invalid-build-metadata");
61
62/// # Too large
63pub const TOO_LARGE: &str = concat!(err_prefix!(), "too-large");
64
65/// # Parser's internal error
66pub const PARSER_ERROR: &str = concat!(err_prefix!(), "parser-error");