Enum erl_pp::Error[][src]

#[non_exhaustive]
pub enum Error {
Show 15 variants UnexpectedToken { token: LexicalToken, expected: String, }, IncludeFileError { source: Error, directive_start: Position, directive_end: Position, target_file_path: PathBuf, }, MissingMacroArg { position: Position, }, UnbalancedParen { open: Option<SymbolToken>, close: SymbolToken, }, UnexpectedEof, FileNotSet { macro_call: MacroCall, }, UndefinedMacro { macro_call: MacroCall, }, UndefinedMacroVar { varname: String, }, MacroArgsMismatched { macro_call: MacroCall, macro_def: MacroDef, }, NonUtf8Path { path: PathBuf, }, UnexpectedDotInMacroDef { position: Position, }, MissingIfDirective { directive: Directive, }, TokenizeError(Error), GlobPatternError(PatternError), GlobError(GlobError),
}
Expand description

Possible errors.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnexpectedToken

Unexpected token.

Fields of UnexpectedToken

token: LexicalTokenexpected: String
IncludeFileError

Include file error.

Fields of IncludeFileError

source: Errordirective_start: Positiondirective_end: Positiontarget_file_path: PathBuf
MissingMacroArg

Missing a macro argument.

Fields of MissingMacroArg

position: Position
UnbalancedParen

Unbalanced parentheses.

Fields of UnbalancedParen

open: Option<SymbolToken>close: SymbolToken
UnexpectedEof

Unexpected EOF.

FileNotSet

Cannot expand ?FILE macro.

Fields of FileNotSet

macro_call: MacroCall
UndefinedMacro

Undefined macro.

Fields of UndefinedMacro

macro_call: MacroCall
UndefinedMacroVar

Undefined macro variable.

Fields of UndefinedMacroVar

varname: String
MacroArgsMismatched

Macro arguments mismatched.

Fields of MacroArgsMismatched

macro_call: MacroCallmacro_def: MacroDef
NonUtf8Path

Non UTF-8 path.

Fields of NonUtf8Path

path: PathBuf
UnexpectedDotInMacroDef

Unexpected ‘.’ in -define directive.

Fields of UnexpectedDotInMacroDef

position: Position
MissingIfDirective

Missing -ifdef or -ifndef.

Fields of MissingIfDirective

directive: Directive
TokenizeError(Error)

Tokenize error.

Tuple Fields of TokenizeError

0: Error
GlobPatternError(PatternError)

Glob pattern error.

Tuple Fields of GlobPatternError

0: PatternError
GlobError(GlobError)

Glob error.

Tuple Fields of GlobError

0: GlobError

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

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

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.