-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "substitute error generator PoC to zksync-error"
This reverts commit 0a54dae.
- Loading branch information
Showing
13 changed files
with
1,550 additions
and
1,504 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
|
||
//! | ||
//! AUTOGENERATED BASED ON A SET OF JSON FILES, DO NOT EDIT MANUALLY | ||
//! | ||
use lazy_static::lazy_static; | ||
use zksync_error_description::ErrorHierarchy; | ||
|
||
lazy_static! { | ||
pub static ref model: ErrorHierarchy = get_model(); | ||
pub static ref model : ErrorHierarchy = get_model(); | ||
} | ||
|
||
|
||
fn get_model() -> ErrorHierarchy { | ||
zksync_error_description::ErrorHierarchy::from_str(include_str!( | ||
"../resources/error-model-dump.json" | ||
)) | ||
zksync_error_description::ErrorHierarchy::from_str(include_str!("../resources/error-model-dump.json")) | ||
} | ||
|
||
#[derive(Debug)] | ||
pub enum DocumentationError { | ||
IncompleteModel(String), | ||
|
||
} | ||
|
||
impl std::fmt::Display for DocumentationError { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
f.write_fmt(format_args!("{self:#?}")) | ||
} | ||
} | ||
impl std::error::Error for DocumentationError {} | ||
|
||
pub trait Documented { | ||
type Documentation; | ||
fn get_documentation(&self) -> Result<Option<Self::Documentation>, DocumentationError>; | ||
} | ||
|
Oops, something went wrong.