mirror of
https://github.com/jely2002/youtube-dl-gui.git
synced 2021-11-01 22:46:21 +03:00
fix: shortmessage error handling not working
This commit is contained in:
@@ -152,7 +152,7 @@ class ErrorHandler {
|
||||
let foundError = false;
|
||||
if(stderr == null) {
|
||||
console.error("An error has occurred but no error message was given.")
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
for(const errorDef of this.errorDefinitions) {
|
||||
if(stderr.includes(errorDef.trigger)) {
|
||||
|
||||
@@ -43,7 +43,9 @@ class Query {
|
||||
return stdout
|
||||
} catch(e) {
|
||||
if(!this.environment.errorHandler.checkError(e.stderr, this.identifier)) {
|
||||
this.environment.errorHandler.raiseUnhandledError("Please report this error.\n" + JSON.stringify(e, null, 2), this.identifier);
|
||||
if(!this.environment.errorHandler.checkError(e.shortMessage, this.identifier)) {
|
||||
this.environment.errorHandler.raiseUnhandledError("Please report this error.\n" + JSON.stringify(e, null, 2), this.identifier);
|
||||
}
|
||||
}
|
||||
return "{}";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user