SWC panic
ing
#3121
Answered
by
gimbling-away
gimbling-away
asked this question in
Q&A
SWC `panic`ing
#3121
-
match e.kind() {
// SyntaxError::Eof => {
// hooks::eof::handle(e, filename, code);
// }
SyntaxError::Unexpected { got, .. } => {
hooks::unexpected::handle(got, e, filename, code);
}
SyntaxError::UnterminatedRegExp => {
hooks::unterminated_regexp::build(e, filename, code);
}
SyntaxError::Expected(got, expected) => {
hooks::expected::handle(got, expected, e, filename, code);
}
SyntaxError::UnexpectedChar { c, .. } => {
hooks::unexpected_char::handle(c, e, filename, code, sourcemap);
}
SyntaxError::ExpectedSemiForExprStmt { expr } => {
hooks::expected_semi_for_expr_stmt::handle(expr, e, filename, code);
}
_ => {
// Call fallback error handler.
logger.error("...");
e.clone().into_diagnostic(&handler).emit();
}
}; |
Beta Was this translation helpful? Give feedback.
Answered by
gimbling-away
Dec 26, 2021
Replies: 2 comments 3 replies
-
I'm sure your code is wrongly using sourcemap |
Beta Was this translation helpful? Give feedback.
3 replies
-
I have fixed this with a workaround. Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gimbling-away
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have fixed this with a workaround. Thanks.