diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-08-18 21:29:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-18 16:29:32 -0400 |
commit | 015fa0bd41ce51afbee4a1413cb90534155c041f (patch) | |
tree | 3220c821156a011225392d2361fdf7272c7be952 /cli/op_error.rs | |
parent | f6e9150b33168ab8c5e48238860e2c3f3bf625f3 (diff) |
refactor: permissions (#7074)
Diffstat (limited to 'cli/op_error.rs')
-rw-r--r-- | cli/op_error.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/op_error.rs b/cli/op_error.rs index 263363122..32ad9c0f7 100644 --- a/cli/op_error.rs +++ b/cli/op_error.rs @@ -174,7 +174,13 @@ impl OpError { } pub fn invalid_domain_error() -> OpError { - OpError::new(ErrorKind::TypeError, "Invalid domain.".to_string()) + OpError::type_error("Invalid domain.".to_string()) + } + + pub fn permission_escalation_error() -> OpError { + OpError::permission_denied( + "Arguments escalate parent permissions.".to_string(), + ) } } |