Skip to content

Commit 73ad3ca

Browse 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

7 files changed

Lines changed: 309 additions & 284 deletions

File tree

‎deps/amaro/dist/errors.js‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"use strict";
2+
exportfunctionisSwcError(error){
3+
returnerror.code!==void0;
4+
}
5+
exportfunctionwrapAndReThrowSwcError(error){
6+
switch(error.code){
7+
case"UnsupportedSyntax": {
8+
constunsupportedSyntaxError=newError(error.message);
9+
unsupportedSyntaxError.name="UnsupportedSyntaxError";
10+
throwunsupportedSyntaxError;
11+
}
12+
case"InvalidSyntax":
13+
thrownewSyntaxError(error.message);
14+
default:
15+
thrownewError(error.message);
16+
}
17+
}

0 commit comments

Comments
 (0)