W3cubDocs

/Sass

Interface LegacyException

The exception type thrown by renderSync and passed as the error to render's callback.

deprecated

This is only thrown by the legacy render and renderSync APIs. Use compile, compileString, compileAsync, and compileStringAsync instead.

Hierarchy

  • Error
    • LegacyException

Index

Properties

Optional column

column?: number

The (1-based) column number within line at which the error occurred, if this exception is associated with a specific Sass file location.

Optional file

file?: string

If this exception was caused by an error in a Sass file, this will represent the Sass file's location. It can be in one of three formats:

  • If the Sass file was loaded from disk, this is the path to that file.
  • If the Sass file was generated by an importer, this is its canonical URL.
  • If the Sass file was passed as LegacyStringOptions.data without a corresponding LegacyStringOptions.file, this is the special string "stdin".

formatted

formatted: string

The error message. For Dart Sass, this is the same as the result of calling toString, which is itself the same as message but with the prefix "Error:".

Optional line

line?: number

The (1-based) line number on which the error occurred, if this exception is associated with a specific Sass file location.

message

message: string

The error message. For Dart Sass, when possible this includes a highlighted indication of where in the source file the error occurred as well as the Sass stack trace.

name

name: string

Optional stack

stack?: string

status

status: number

Analogous to the exit code for an executable. 1 for an error caused by a Sass file, 3 for any other type of error.

© 2006–2022 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/interfaces/LegacyException