Table of Contents

Class CrashLog

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Writes down what went wrong when something escapes every handler, so a crash leaves a trace.

public static class CrashLog
Inheritance
CrashLog
Inherited Members

Remarks

There was no global handler at all. An exception nobody caught closed the app without a word, and the servers it had started went on running with no window to stop them — the next start found their ports busy and offered to kill them, which does not save the world. Now each one leaves a crash-*.log beside the console logs, with what failed, where, and on what system: the file to attach to a bug report.

Only the newest McServerLauncher.Services.CrashLog.Keep are kept; a fault that repeats should not fill the folder.

Methods

Write(string, Exception)

Records error. Returns the file, or null if it could not be written.

public static string? Write(string origin, Exception error)

Parameters

origin string

Which handler caught it, so the file says how far it got.

error Exception

What was thrown.

Returns

string