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:
The stack I printed is as follows:
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
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.
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](https://user-images.githubusercontent.com/27800311/127114682-5336cdf1-8a98-424a-9aca-e147daf2e462.png)
The stack I printed is as follows:![image](https://user-images.githubusercontent.com/27800311/127114683-302d59e9-f340-48f8-a4d4-d4c58f082eaf.png)
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