Skip to content

Commit b537ade

Browse files
authored
Merge pull request rpgtkoolmv#144 from rpgtkoolmv/suppress_error
Don't stop the game on browser extension's error
2 parents 221fe19 + 669ea8c commit b537ade

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

js/rpg_managers/SceneManager.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,14 @@ SceneManager.terminate = function() {
156156

157157
SceneManager.onError = function(e) {
158158
console.error(e.message);
159-
console.error(e.filename, e.lineno);
160-
try {
161-
this.stop();
162-
Graphics.printError('Error', e.message);
163-
AudioManager.stopAll();
164-
} catch (e2) {
159+
if (e.filename || e.lineno) {
160+
console.error(e.filename, e.lineno);
161+
try {
162+
this.stop();
163+
Graphics.printError('Error', e.message);
164+
AudioManager.stopAll();
165+
} catch (e2) {
166+
}
165167
}
166168
};
167169

0 commit comments

Comments
 (0)