feat(xatu): reject files with parse errors
This commit was merged in pull request #72.
This commit is contained in:
@@ -10,6 +10,7 @@ pub trait ResultExt<T> {
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Code {
|
||||
InvalidArgument,
|
||||
FailedPrecondition,
|
||||
NotFound,
|
||||
PermissionDenied,
|
||||
Internal,
|
||||
@@ -39,6 +40,10 @@ impl Status {
|
||||
Self::new(Code::InvalidArgument, message)
|
||||
}
|
||||
|
||||
pub fn failed_precondition(message: impl Into<String>) -> Self {
|
||||
Self::new(Code::FailedPrecondition, message)
|
||||
}
|
||||
|
||||
pub fn permission_denied(message: impl Into<String>) -> Self {
|
||||
Self::new(Code::PermissionDenied, message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user