Spec-Zone.ru › Sass

Exception

An exception thrown because a Sass compilation failed.

Hierarchy

  • Error
    • Exception
  • Defined in js-api-doc/exception.d.ts:8
Index

Constructors

constructor

Properties

message name sassMessage sassStack span stack? prepareStackTrace? stackTraceLimit

Methods

toString captureStackTrace

Constructors

Private constructor

  • new Exception(): Exception
  • Returns Exception

    Overrides Error.constructor

    • Defined in js-api-doc/exception.d.ts:9

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).

Overrides Error.message

  • Defined in js-api-doc/exception.d.ts:20

name

name: string

Inherited from Error.name

  • Defined in node_modules/typescript/lib/lib.es5.d.ts:1054

Readonly sassMessage

sassMessage: string

A textual description of what went wrong.

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

  • Defined in js-api-doc/exception.d.ts:28

Readonly sassStack

sassStack: string

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

  • Defined in js-api-doc/exception.d.ts:34

Readonly span

span: SourceSpan

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

  • Defined in js-api-doc/exception.d.ts:37

Optional stack

stack?: string

Inherited from Error.stack

  • Defined in node_modules/typescript/lib/lib.es5.d.ts:1056

Static Optional prepareStackTrace

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

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • Optional override for formatting stack traces

      See

      https://v8.dev/docs/stack-trace-api#customizing-stack-traces

      Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

Inherited from Error.prepareStackTrace

  • Defined in node_modules/@types/node/globals.d.ts:11

Static stackTraceLimit

stackTraceLimit: number

Inherited from Error.stackTraceLimit

  • Defined in node_modules/@types/node/globals.d.ts:13

Methods

toString

  • toString(): string
  • Returns the same string as message.

    Returns string

    • Defined in js-api-doc/exception.d.ts:40

Static captureStackTrace

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

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

    Inherited from Error.captureStackTrace

    • Defined in node_modules/@types/node/globals.d.ts:4
sass
  • Compile
    • AsyncCompiler
    • Compiler
    • CompileResult
    • compile
    • compileAsync
    • compileString
    • compileStringAsync
    • initAsyncCompiler
    • initCompiler
  • Options
    • Options
    • StringOptions
    • OutputStyle
    • StringOptionsWithImporter
    • StringOptionsWithoutImporter
    • Syntax
  • Logger
    • Logger
      • silent
    • Logger
    • SourceLocation
    • SourceSpan
    • LoggerWarnOptions
  • Importer
    • NodePackageImporter
    • FileImporter
    • Importer
    • ImporterResult
  • Custom Function
    • CalculationInterpolation
    • CalculationOperation
    • SassArgumentList
    • SassBoolean
    • SassCalculation
    • SassColor
    • SassFunction
    • SassList
    • SassMap
    • SassMixin
    • SassNumber
    • SassString
    • Value
    • CalculationOperator
    • CalculationValue
    • CustomFunction
    • ListSeparator
    • sassFalse
    • sassNull
    • sassTrue
  • Other
    • Exception
    • CanonicalizeContext
    • Deprecations
    • LegacyFileOptions
    • ChannelName
    • ChannelNameHsl
    • ChannelNameHwb
    • ChannelNameLab
    • ChannelNameLch
    • ChannelNameRgb
    • ChannelNameXyz
    • ColorSpaceHsl
    • ColorSpaceHwb
    • ColorSpaceLab
    • ColorSpaceLch
    • ColorSpaceRgb
    • ColorSpaceXyz
    • GamutMapMethod
    • HueInterpolationMethod
    • KnownColorSpace
    • PolarColorSpace
    • PromiseOr
    • RectangularColorSpace
    • info
  • Legacy
    • types
      • Boolean
      • Color
      • Error
      • List
      • Map
      • Null
      • Number
      • String
    • LegacyException
    • LegacyImporterThis
    • LegacyPluginThis
    • LegacyResult
    • LegacySharedOptions
    • LegacyStringOptions
    • LegacyAsyncFunction
    • LegacyAsyncFunctionDone
    • LegacyAsyncImporter
    • LegacyFunction
    • LegacyImporter
    • LegacyImporterResult
    • LegacyOptions
    • LegacySyncFunction
    • LegacySyncImporter
    • LegacyValue
    • FALSE
    • NULL
    • TRUE
    • render
    • renderSync
  • Messages
    • Version
    • Deprecation
    • DeprecationOrId
    • DeprecationStatus
    • deprecations

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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API