Skip to content

Commit 3d0b5dc

Browse files
committed
fix(sdk): logging demo error
1 parent e852888 commit 3d0b5dc

File tree

1 file changed

+14
-8
lines changed
  • engine/core/src/main/resources/view/core

1 file changed

+14
-8
lines changed

engine/core/src/main/resources/view/core/Drawer.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,20 @@ export class Drawer {
215215
}
216216

217217
var demoContainer = new PIXI.Container()
218-
219-
this.initDefaultFrames(this.demo.playerCount, this.demo.frames, this.demo.agents)
220-
/** **************************************************************************************************************************************** */
221-
this.preconstructScene(this.scope, container, this.initWidth, this.initHeight)
222-
this.initScene(this.scope, demoContainer, this.frames, true)
223-
this.updateScene(this.scope, this.question, this.frames, this.currentFrame, this.progress, 1, this.reasons[this.currentFrame], true)
224-
/** **************************************************************************************************************************************** */
225-
218+
try {
219+
this.initDefaultFrames(this.demo.playerCount, this.demo.frames, this.demo.agents)
220+
/** **************************************************************************************************************************************** */
221+
this.preconstructScene(this.scope, container, this.initWidth, this.initHeight)
222+
this.initScene(this.scope, demoContainer, this.frames, true)
223+
this.updateScene(this.scope, this.question, this.frames, this.currentFrame, this.progress, 1, this.reasons[this.currentFrame], true)
224+
/** **************************************************************************************************************************************** */
225+
} catch (error) {
226+
console.error('Cannot load demo, you might want to reset the demo')
227+
ErrorLog.push({
228+
cause: error,
229+
message: 'Cannot load demo, you might want to reset the demo'
230+
})
231+
}
226232
scope.demo = demoContainer
227233
scope.demotime = 0
228234

0 commit comments

Comments
 (0)