[][src]Struct nu_errors::ShellError

pub struct ShellError {
    pub error: ProximateShellError,
    pub cause: Option<Box<ShellError>>,
}

A ShellError is a proximate error and a possible cause, which could have its own cause, creating a cause chain.

Fields

error: ProximateShellErrorcause: Option<Box<ShellError>>

Implementations

impl ShellError[src]

pub fn type_error(
    expected: impl Into<String>,
    actual: Spanned<impl Into<String>>
) -> ShellError
[src]

An error that describes a mismatch between the given type and the expected type

pub fn missing_property(
    subpath: Spanned<impl Into<String>>,
    expr: Spanned<impl Into<String>>
) -> ShellError
[src]

pub fn missing_value(
    span: impl Into<Option<Span>>,
    reason: impl Into<String>
) -> ShellError
[src]

pub fn invalid_integer_index(
    subpath: Spanned<impl Into<String>>,
    integer: impl Into<Span>
) -> ShellError
[src]

pub fn untagged_runtime_error(error: impl Into<String>) -> ShellError[src]

pub fn unexpected_eof(
    expected: impl Into<String>,
    span: impl Into<Span>
) -> ShellError
[src]

pub fn range_error(
    expected: impl Into<ExpectedRange>,
    actual: &Spanned<impl Debug>,
    operation: impl Into<String>
) -> ShellError
[src]

pub fn syntax_error(problem: Spanned<impl Into<String>>) -> ShellError[src]

pub fn coerce_error(
    left: Spanned<impl Into<String>>,
    right: Spanned<impl Into<String>>
) -> ShellError
[src]

pub fn argument_error(
    command: Spanned<impl Into<String>>,
    kind: ArgumentError
) -> ShellError
[src]

pub fn diagnostic(diagnostic: Diagnostic<usize>) -> ShellError[src]

pub fn external_non_zero() -> ShellError[src]

pub fn into_diagnostic(self) -> Option<Diagnostic<usize>>[src]

pub fn labeled_error(
    msg: impl Into<String>,
    label: impl Into<String>,
    span: impl Into<Span>
) -> ShellError
[src]

pub fn labeled_error_with_secondary(
    msg: impl Into<String>,
    primary_label: impl Into<String>,
    primary_span: impl Into<Span>,
    secondary_label: impl Into<String>,
    secondary_span: impl Into<Span>
) -> ShellError
[src]

pub fn unimplemented(title: impl Into<String>) -> ShellError[src]

pub fn unexpected(title: impl Into<String>) -> ShellError[src]

Trait Implementations

impl Clone for ShellError[src]

impl Debug for ShellError[src]

impl<'de> Deserialize<'de> for ShellError[src]

impl Display for ShellError[src]

impl Eq for ShellError[src]

impl Error for ShellError[src]

impl Error for ShellError[src]

impl From<Box<dyn Error + 'static + Sync + Send>> for ShellError[src]

impl From<Box<dyn Error + 'static>> for ShellError[src]

impl From<Error> for ShellError[src]

impl From<Error> for ShellError[src]

impl From<Error> for ShellError[src]

impl From<Error> for ShellError[src]

impl From<FromUtf8Error> for ShellError[src]

impl From<ParseError> for ShellError[src]

Convert a ParseError into a ShellError

impl From<PatternError> for ShellError[src]

impl From<Utf8Error> for ShellError[src]

impl HasFallibleSpan for ShellError[src]

impl Hash for ShellError[src]

impl Ord for ShellError[src]

impl PartialEq<ShellError> for ShellError[src]

impl PartialOrd<ShellError> for ShellError[src]

impl PrettyDebug for ShellError[src]

PrettyDebug is for internal debugging. For user-facing debugging, into_diagnostic is used, which prints an error, highlighting spans.

impl Serialize for ShellError[src]

impl StructuralEq for ShellError[src]

impl StructuralPartialEq for ShellError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> HasFallibleSpan for T where
    T: HasSpan
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSpanned for T where
    T: HasFallibleSpan
[src]

type Output = T

impl<T> PrettyDebugWithSource for T where
    T: PrettyDebug
[src]

impl<T> SpannedItem for T[src]

impl<T> TaggedItem for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.