马宇豪
2024-07-16 f591c27b57e2418c9495bc02ae8cfff84d35bc18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import {SourceSpan} from './logger';
 
/**
 * An exception thrown because a Sass compilation failed.
 *
 * @category Other
 */
export class Exception extends Error {
  private constructor();
 
  /**
   * 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]]).
   */
  message: string;
 
  /**
   * A textual description of what went wrong.
   *
   * Unlike [[message]], this does *not* include representations of [[span]] or
   * [[sassStack]].
   */
  readonly sassMessage: string;
 
  /**
   * A human-friendly representation of the Sass stack trace at the point of
   * error.
   */
  readonly sassStack: string;
 
  /** The location the error occurred in the Sass file that triggered it. */
  readonly span: SourceSpan;
 
  /** Returns the same string as [[message]]. */
  toString(): string;
}