Add error handling for Discord callback.
This commit is contained in:
@@ -34,7 +34,14 @@ namespace Cryville.Crtr {
|
||||
|
||||
void Update() {
|
||||
if (dc == null) return;
|
||||
dc.RunCallbacks();
|
||||
try {
|
||||
dc.RunCallbacks();
|
||||
}
|
||||
catch (ResultException ex) {
|
||||
dc.Dispose();
|
||||
dc = null;
|
||||
Logger.Log("main", 4, "Discord", "An error occured while running callbacks: {0}", ex);
|
||||
}
|
||||
}
|
||||
|
||||
void OnApplicationQuit() {
|
||||
|
Reference in New Issue
Block a user