mirror of
https://github.com/System-End/Vencord.git
synced 2026-04-19 20:55:13 +00:00
CrashHandler: log component stack on crash (#3933)
This commit is contained in:
parent
d86423cae3
commit
38a9f12296
1 changed files with 7 additions and 0 deletions
|
|
@ -76,6 +76,13 @@ export default definePlugin({
|
|||
],
|
||||
|
||||
handleCrash(_this: any, errorState: any) {
|
||||
if (IS_DEV) {
|
||||
try {
|
||||
if (errorState?.info && "componentStack" in errorState.info) {
|
||||
console.error("Component Stack:", errorState.info.componentStack);
|
||||
}
|
||||
} catch { }
|
||||
}
|
||||
_this.setState(errorState);
|
||||
|
||||
// Already recovering, prevent error which happens more than once too fast to trigger another recover
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue