| 1 |
/** |
| 2 |
* The exception type thrown by {@link renderSync} and passed as the error to |
| 3 |
* {@link render}'s callback. |
| 4 |
* |
| 5 |
* @category Legacy |
| 6 |
* @deprecated This is only thrown by the legacy {@link render} and {@link |
| 7 |
* renderSync} APIs. Use {@link compile}, {@link compileString}, {@link |
| 8 |
* compileAsync}, and {@link compileStringAsync} instead. |
| 9 |
*/ |
| 10 |
export interface LegacyException extends Error { |
| 11 |
/** |
| 12 |
* The error message. For Dart Sass, when possible this includes a highlighted |
| 13 |
* indication of where in the source file the error occurred as well as the |
| 14 |
* Sass stack trace. |
| 15 |
*/ |
| 16 |
message: string; |
| 17 |
|
| 18 |
/** |
| 19 |
* The error message. For Dart Sass, this is the same as the result of calling |
| 20 |
* {@link toString}, which is itself the same as {@link message} but with the |
| 21 |
* prefix "Error:". |
| 22 |
*/ |
| 23 |
formatted: string; |
| 24 |
|
| 25 |
/** |
| 26 |
* The (1-based) line number on which the error occurred, if this exception is |
| 27 |
* associated with a specific Sass file location. |
| 28 |
*/ |
| 29 |
line?: number; |
| 30 |
|
| 31 |
/** |
| 32 |
* The (1-based) column number within {@link line} at which the error |
| 33 |
* occurred, if this exception is associated with a specific Sass file |
| 34 |
* location. |
| 35 |
*/ |
| 36 |
column?: number; |
| 37 |
|
| 38 |
/** |
| 39 |
* Analogous to the exit code for an executable. `1` for an error caused by a |
| 40 |
* Sass file, `3` for any other type of error. |
| 41 |
*/ |
| 42 |
status: number; |
| 43 |
|
| 44 |
/** |
| 45 |
* If this exception was caused by an error in a Sass file, this will |
| 46 |
* represent the Sass file's location. It can be in one of three formats: |
| 47 |
* |
| 48 |
* * If the Sass file was loaded from disk, this is the path to that file. |
| 49 |
* * If the Sass file was generated by an importer, this is its canonical URL. |
| 50 |
* * If the Sass file was passed as {@link LegacyStringOptions.data} without a |
| 51 |
* corresponding {@link LegacyStringOptions.file}, this is the special |
| 52 |
* string `"stdin"`. |
| 53 |
*/ |
| 54 |
file?: string; |
| 55 |
} |