-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nextjs] fix hard crash of nextjs #270
base: master
Are you sure you want to change the base?
Conversation
df0b563
to
7d0c13b
Compare
const error = new Error((e as Error).message); | ||
error.stack = (e as Error).stack; | ||
throw error; | ||
} catch(e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like stated in the pr comment that I am not sure how to show this. But regarding you will see it in the Error view in your browser.
Like my example repo
It is handled. So i am not really sure what this throw aims to do since it is not handle anywhere. So today it will just crash nextjs and you have to restart the process.
This pr aims to fix this issue #268
In webpack I don't really see the need for throwing a new error. This throw will crash webpack. By just removing the throw we do get the Webpack Error in the browser.
Wrapping
this.handleCall(this.callParam, values);
in a try catch also fixes the crash of using the theme object in wrong way. However I do not really get how this error should be displayed in the webpack error view. Need some help there