Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mergeInto(LibraryManager.library, {

ThrowJavaScript: function () {
var something = undefined;
console.log("JavaScript error incoming...");
something.do();
},

});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections;
using System.Collections.Generic;
#if ENABLE_IL2CPP || PLATFORM_IOS
#if ENABLE_IL2CPP || PLATFORM_IOS || PLATFORM_WEBGL
using System.Runtime.InteropServices;
#endif
using UnityEngine;
Expand Down Expand Up @@ -30,8 +30,13 @@ public void ThrowKotlin()
{
jo.CallStatic("throw");
}
#else
// TODO: Add this sample to its own button:
#if PLATFORM_WEBGL
ThrowJavaScript();
#else
Debug.LogWarning("Not running on Android.");
#endif
#endif
}

Expand Down Expand Up @@ -124,6 +129,21 @@ public void ThrowObjectiveC()
private static extern void throwObjectiveC();
#endif

public void ThrowJavaScript()
{
#if PLATFORM_WEBGL
throwJavaScript();
#else
Debug.Log("JavaScript interop only works on WebGL players.");
#endif
}

#if PLATFORM_WEBGL
// JavaScriptPlugin.jslib
[DllImport("__Internal")]
private static extern void throwJavaScript();
#endif

public void LoadBugfarm() => SceneManager.LoadScene("1_Bugfarm");
public void LoadAdditionalSamples() => SceneManager.LoadScene("3_AdditionalSamples");
}
2 changes: 1 addition & 1 deletion src/sentry-dotnet
Submodule sentry-dotnet updated 47 files
+13 −8 CHANGELOG.md
+1 −3 samples/Sentry.Samples.Console.Customized/Program.cs
+2 −2 src/Sentry.AspNetCore/Extensions/HttpContextExtensions.cs
+0 −6 src/Sentry.AspNetCore/ISentryRouteName.cs
+9 −0 src/Sentry.AspNetCore/SentryAspNetCoreOptions.cs
+5 −0 src/Sentry.AspNetCore/SentryTracingMiddleware.cs
+11 −0 src/Sentry.AspNetCore/TransactionNameProvider.cs
+4 −10 src/Sentry.Google.Cloud.Functions/SentryStartup.cs
+1 −1 src/Sentry/Envelopes/Envelope.cs
+5 −1 src/Sentry/Envelopes/EnvelopeItem.cs
+1 −1 src/Sentry/Envelopes/ISerializable.cs
+5 −0 src/Sentry/Extensibility/DisabledHub.cs
+10 −0 src/Sentry/Extensibility/HubAdapter.cs
+1 −1 src/Sentry/Extensibility/IBackgroundWorker.cs
+35 −0 src/Sentry/HubExtensions.cs
+11 −0 src/Sentry/IHub.cs
+8 −19 src/Sentry/Internal/Http/CachingTransport.cs
+16 −0 src/Sentry/Internal/Hub.cs
+6 −1 src/Sentry/Sentry.csproj
+4 −1 src/Sentry/SentryOptions.cs
+43 −0 src/Sentry/SentrySdk.cs
+6 −0 src/Sentry/buildTransitive/Sentry.props
+1 −2 test/Directory.Build.props
+2 −0 test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.Core2_1.verified.txt
+2 −0 test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.Core3_1.verified.txt
+2 −0 test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt
+2 −0 test/Sentry.AspNetCore.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt
+2 −3 test/Sentry.AspNetCore.Tests/Extensions/HttpContextExtensionsTests.cs
+87 −0 test/Sentry.AspNetCore.Tests/SentryTracingMiddlewareTests.cs
+9 −0 test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.Core2_1.verified.txt
+9 −0 test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.Core3_0.verified.txt
+57 −0 test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.Core3_1.verified.txt
+57 −0 test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt
+57 −0 test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt
+4 −11 test/Sentry.DiagnosticSource.Tests/Integration/SQLite/SentryDiagnosticListenerTests.cs
+32 −23 test/Sentry.DiagnosticSource.Tests/Sentry.DiagnosticSource.Tests.csproj
+1 −1 test/Sentry.DiagnosticSource.Tests/SentryEFCoreListenerTests.cs
+57 −0 test/Sentry.Tests/ApiApprovalTests.Run.Core2_1.verified.txt
+57 −0 test/Sentry.Tests/ApiApprovalTests.Run.Core3_0.verified.txt
+57 −0 test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt
+57 −0 test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_6.verified.txt
+57 −0 test/Sentry.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt
+57 −0 test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt
+1 −0 test/Sentry.Tests/Extensibility/HubAdapterTests.cs
+3 −7 test/Sentry.Tests/Internals/Http/CachingTransportTests.cs
+16 −17 test/Sentry.Tests/ModuleInit.cs
+102 −0 test/Sentry.Tests/SentrySdkTests.cs