MultiConnectMultiConnectDocs Website home
MultiConnectSDK › SDK Apps

14. Errors

What is caught

After McApp.StartAsync, MultiConnectSDK reports your game's errors to the dashboard by itself:

A crash that closes the game still reports: the error is written to the device straight away and sent on the next start.

Not caught:

Cost on the device: each distinct error is sent once per session with a count, at most 20 distinct errors are queued, and sends happen at most every 30 seconds.

Report caught exceptions and server errors

Script 14.1: Report an exception you caught

using System;
using MultiConnect.App;

public static class SafeCall
{
    public static void Run(Action action)
    {
        try { action(); }
        catch (Exception ex) { McAppErrors.Report(ex); }
    }
}

On a game server or .NET API, call McAppErrors.StartForServer() once at startup. It reads the SDK key from MC_SDK_KEY, or takes it as an argument. Server errors are marked as coming from a server.

The Errors page

On the app page, open Errors.

Collect turns error reports off and on for the app.