nushell/crates/nu-protocol/src/shell_error.rs
2021-09-06 14:20:02 +12:00

19 lines
463 B
Rust

use crate::{ast::Operator, Span, Type};
#[derive(Debug, Clone)]
pub enum ShellError {
OperatorMismatch {
op_span: Span,
lhs_ty: Type,
lhs_span: Span,
rhs_ty: Type,
rhs_span: Span,
},
UnsupportedOperator(Operator, Span),
UnknownOperator(String, Span),
ExternalNotSupported(Span),
InternalError(String),
VariableNotFoundAtRuntime(Span),
CantConvert(String, Span),
DivisionByZero(Span),
}