Made MTTError a proper Error structure.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
This commit is contained in:
@@ -18,7 +18,7 @@ use queue::{
|
||||
use std::sync::mpsc::{channel, Receiver};
|
||||
use uuid::Uuid;
|
||||
|
||||
pub use mtterror::MTTError;
|
||||
pub use mtterror::{ErrorID, MTTError};
|
||||
pub use name::{Name, NameType};
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -118,7 +118,7 @@ impl MoreThanText {
|
||||
if name == "page" {
|
||||
Ok("something".to_string())
|
||||
} else {
|
||||
Err(MTTError::DocumentNotFound(name.to_string()))
|
||||
Err(MTTError::new(NameType::None, ErrorID::DocumentNotFound))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user