Class Exception

An exception thrown because a Sass compilation failed.

Hierarchy

  • Error
    • Exception

Index

Properties

message

message: string

A human-friendly representation of the exception.

Because many tools simply print Error.message directly, this includes not only the textual description of what went wrong (the sassMessage) but also an indication of where in the Sass stylesheet the error occurred (the span) and the Sass stack trace at the point of error (the sassStack).

name

name: string

Readonly sassMessage

sassMessage: string

A textual description of what went wrong.

Unlike message, this does not include representations of span or sassStack.

Readonly sassStack

sassStack: string

A human-friendly representation of the Sass stack trace at the point of error.

Readonly span

The location the error occurred in the Sass file that triggered it.

Optional stack

stack?: string

Static Optional prepareStackTrace

prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Type declaration

Static stackTraceLimit

stackTraceLimit: number

Methods

toString

  • toString(): string

Static captureStackTrace

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void