Skip to content

Commit

Permalink
Stop reporting interruption errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Dec 27, 2023
1 parent 144b835 commit fb868a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/scriptapi/scripting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ void Scripting::populateGlobalObject(MainWindow *mainWindow) {
}

bool Scripting::tryErrorJS(QJSValue js) {
if (!js.isError()) return false;
if (!js.isError())
return false;

// The script engine is interrupted during project reopen, during which
// all script modules intentionally return as error objects.
// We don't need to report these "errors" to the user.
if (!instance || !instance->engine || !instance->engine->isInterrupted())
return false;

// Get properties of the error
QFileInfo file(js.property("fileName").toString());
Expand Down

0 comments on commit fb868a2

Please sign in to comment.