mirror of
https://github.com/AleoHQ/leo.git
synced 2024-09-11 15:05:33 +03:00
Remove input errors
This commit is contained in:
parent
a38c407ea0
commit
e990b7ca66
@ -2,8 +2,6 @@
|
||||
|
||||
## Parser Errors: Error Code Range 370_000 - 370_999
|
||||
|
||||
## State Errors: Error Code Range 371_000 - 371_999
|
||||
|
||||
## AST Errors: Error Code Range 372_000 - 372_999
|
||||
|
||||
## ASG Errors: Error Code Range 373_000 - 373_999
|
||||
|
@ -49,10 +49,6 @@ The errors for the `leo-compiler` crate. Its error codes will range from 6_000-6
|
||||
|
||||
The errors for the `leo-imports` crate. Its error codes will range from 4_000-4_999 and be prefixed with the characters `IMP`.
|
||||
|
||||
### Input
|
||||
|
||||
The errors for the `leo-ast` crate. Its error codes will range from 8_000-8_999 and be prefixed with the characters `INP`.
|
||||
|
||||
### Loop Unrolling
|
||||
|
||||
The errors for loop unrolling in the `leo-passes` crate. Its error codes will range from 9_000-9_999 and be prefixed with the characters `LUN`.
|
||||
@ -70,10 +66,6 @@ The errors for the `leo-parser` crate. Its error codes will range from 0-999 and
|
||||
The errors from SnarkVM that bubble up into Leo in some situations. For right now, they have an exit code of 1.
|
||||
When SnarkVM implements better error codes and messages, we can bubble them up.
|
||||
|
||||
### State
|
||||
|
||||
The errors for the `leo-state` crate. Its error codes will range from 1_000-1_999 and be prefixed with the characters `STA`.
|
||||
|
||||
### Utils
|
||||
|
||||
The errors related to dependency retrieval in the `utils` crate. Its error codes will range from 10_000-10_999 and be prefixed with the characters `DEP`.
|
||||
|
@ -33,10 +33,7 @@ pub use self::compiler::*;
|
||||
pub mod flattener;
|
||||
pub use self::flattener::*;
|
||||
|
||||
/// Contains the Input error definitions.
|
||||
pub mod input;
|
||||
pub use self::input::*;
|
||||
|
||||
/// Contains the Loop Unroller error definitions.
|
||||
pub mod loop_unroller;
|
||||
pub use self::loop_unroller::*;
|
||||
|
||||
@ -69,9 +66,6 @@ pub enum LeoError {
|
||||
/// Represents an Compiler Error in a Leo Error.
|
||||
#[error(transparent)]
|
||||
CompilerError(#[from] CompilerError),
|
||||
/// Represents an Input Error in a Leo Error.
|
||||
#[error(transparent)]
|
||||
InputError(#[from] InputError),
|
||||
/// Represents an Package Error in a Leo Error.
|
||||
#[error(transparent)]
|
||||
PackageError(#[from] PackageError),
|
||||
@ -108,7 +102,6 @@ impl LeoError {
|
||||
AstError(error) => error.error_code(),
|
||||
CompilerError(error) => error.error_code(),
|
||||
CliError(error) => error.error_code(),
|
||||
InputError(error) => error.error_code(),
|
||||
ParserError(error) => error.error_code(),
|
||||
PackageError(error) => error.error_code(),
|
||||
TypeCheckerError(error) => error.error_code(),
|
||||
@ -128,7 +121,6 @@ impl LeoError {
|
||||
AstError(error) => error.exit_code(),
|
||||
CompilerError(error) => error.exit_code(),
|
||||
CliError(error) => error.exit_code(),
|
||||
InputError(error) => error.exit_code(),
|
||||
ParserError(error) => error.exit_code(),
|
||||
PackageError(error) => error.exit_code(),
|
||||
TypeCheckerError(error) => error.exit_code(),
|
||||
|
@ -1,19 +0,0 @@
|
||||
// Copyright (C) 2019-2023 Aleo Systems Inc.
|
||||
// This file is part of the Leo library.
|
||||
|
||||
// The Leo library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// The Leo library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
/// This module contains the State error definitions.
|
||||
pub mod state_errors;
|
||||
pub use self::state_errors::*;
|
@ -1,29 +0,0 @@
|
||||
// Copyright (C) 2019-2023 Aleo Systems Inc.
|
||||
// This file is part of the Leo library.
|
||||
|
||||
// The Leo library is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// The Leo library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::create_errors;
|
||||
|
||||
use std::{
|
||||
error::Error as ErrorArg,
|
||||
fmt::{Debug, Display},
|
||||
};
|
||||
|
||||
create_errors!(
|
||||
/// StateError enum that represents all the errors for the `leo-state` crate.
|
||||
StateError,
|
||||
exit_code_mask: 1000i32,
|
||||
error_code_prefix: "STA",
|
||||
);
|
Loading…
Reference in New Issue
Block a user