pub enum Error {
Show 14 variants Input(StringError), IoError(Error), BadCall(StringSourcePosOption<SourcePos>), InvalidFunctionName(SourcePos), BadValue(String), BadArgument(NameString), BadArguments(StringSourcePos), ImportLoop(SourcePosSourcePos), BadRange(RangeError), ParseError(ParseError), UndefinedVariable(SourcePos), UndefModule(StringSourcePos), AtError(StringSourcePos), S(String),
}
Expand description

Most functions in rsass that returns a Result uses this Error type.

Variants

Input(StringError)

An IO error encoundered on a specific path

IoError(Error)

An IO error without specifying a path.

This is (probably) an error writing output.

BadCall(StringSourcePosOption<SourcePos>)

A bad call to a builtin function, with call- and optionally declaration position.

InvalidFunctionName(SourcePos)

Tried to declare a function with a forbidden name.

BadValue(String)

Some kind of illegal value.

BadArgument(NameString)

An illegal value for a specific parameter.

BadArguments(StringSourcePos)

The pos here is the function declaration. This error will be wrapped in a BadCall, giving the pos of the call.

ImportLoop(SourcePosSourcePos)

Tried to import file at pos while already importing it at pos.

BadRange(RangeError)

A range error

ParseError(ParseError)

Error parsing sass data.

UndefinedVariable(SourcePos)

An undefined variable was used at source pos.

UndefModule(StringSourcePos)

Attemt to use an undefined module.

AtError(StringSourcePos)

An @error reached.

S(String)

Fallback error type.

This just contains a string with some message.

Implementations

A bad value with an “(actual) is not (expected)” message.

Wrong kind of argument to a sass function. expected is a string describing what the parameter should have been, actual is the argument.

A generic error message.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more