Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 73ad3ca

Browse filesBrowse files
nodejs-github-botaduh95
authored andcommitted
deps: update amaro to 0.3.0
PR-URL: #56568 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
1 parent 7e58da6 commit 73ad3ca
Copy full SHA for 73ad3ca

File tree

Expand file treeCollapse file tree

7 files changed

+309
-284
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

7 files changed

+309
-284
lines changed
Open diff view settings
Collapse file

‎deps/amaro/dist/errors.js‎

Copy file name to clipboard
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"use strict";
2+
export function isSwcError(error) {
3+
return error.code !== void 0;
4+
}
5+
export function wrapAndReThrowSwcError(error) {
6+
switch (error.code) {
7+
case "UnsupportedSyntax": {
8+
const unsupportedSyntaxError = new Error(error.message);
9+
unsupportedSyntaxError.name = "UnsupportedSyntaxError";
10+
throw unsupportedSyntaxError;
11+
}
12+
case "InvalidSyntax":
13+
throw new SyntaxError(error.message);
14+
default:
15+
throw new Error(error.message);
16+
}
17+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.