Skip to content

Commit cdd3fc7

Browse files
fix(DeviceService): Catch errors in frameStateEvent
1 parent 7a5cd5c commit cdd3fc7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/device.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,12 @@ export class DeviceService {
316316
if (s.pose) s.pose.r = contextViewId;
317317
}
318318

319-
this.frameStateEvent.raiseEvent(state);
319+
try {
320+
this.frameStateEvent.raiseEvent(state);
321+
} catch(e) {
322+
this.sessionService.manager.sendError(e);
323+
this.sessionService.errorEvent.raiseEvent(e);
324+
}
320325

321326
const vrDisplay = this._vrDisplay;
322327
if (this.autoSubmitFrame && vrDisplay && vrDisplay.isPresenting) {

0 commit comments

Comments
 (0)