dvajs / dva

🌱 React and redux based, lightweight and elm-style framework. (Inspired by elm and choo)
https://dvajs.com/
MIT License
16.24k stars 3.17k forks source link

how to get the error details ? #2454

Closed yangGuangXiaDeHaiFeng closed 2 years ago

yangGuangXiaDeHaiFeng commented 3 years ago

I encountered a problem of how to get the error details. The so-called details include the type of error, the error message, and the file where the error occurred. I use the unified error handling method onError in dva, but I can only get the name (error type) and message (error message) from it, and there is no way to get the file in which the error occurred. I tried to output the error.stack, and found that the information did not show the specific location of the error. The console error is as follows: image

The stack I printed is as follows: image

my question is: How can I get the file where the error is located? In other words, why the error file information is lost in error.stack, is there any way to remedy it? thank you very much

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.