Skip to content

WebGL JavaScript & native error handling #668

@vaind

Description

@vaind

After the dotnet WebGL support is merged in #657, we can add support for javascript errors. There are two main approaches, the selection of the best one is part of this issue:

  1. either include sentry-javascript and let it do the reporting
  2. or implement the error handlers same as sentry-javascript does but forward errors to dotnet via wasm calls (if that's even possible - there's a list of all native functions available in development build sources)

In both cases, we would need to add an editor script that updates the generated JS sources (that supports both development & release builds, the latter including compression).

There's already a button to trigger a JS error - look for ThrowJavaScript(), enable it in NativeSupportScene.cs - but there would likely need to be more, e.g. to also include it in the SmokeTest.

As a related topic, we should check whether the selected approach also covers errors in the native code that are unhandled - you can reproduce those within the "Native Samples" scene in the sample repo.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions