Report loader exceptions
This commit is contained in:
@@ -5,6 +5,7 @@ using System.IO;
|
|||||||
using System.IO.Compression;
|
using System.IO.Compression;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -166,6 +167,9 @@ quit";
|
|||||||
{
|
{
|
||||||
var ex = (Exception)e.ExceptionObject;
|
var ex = (Exception)e.ExceptionObject;
|
||||||
Log.Fatal(ex);
|
Log.Fatal(ex);
|
||||||
|
if (ex is ReflectionTypeLoadException exti)
|
||||||
|
foreach (Exception exl in exti.LoaderExceptions)
|
||||||
|
Log.Fatal($"Sub exception: {exl}");
|
||||||
Console.WriteLine("Exiting in 5 seconds.");
|
Console.WriteLine("Exiting in 5 seconds.");
|
||||||
Thread.Sleep(5000);
|
Thread.Sleep(5000);
|
||||||
if (_config.RestartOnCrash)
|
if (_config.RestartOnCrash)
|
||||||
|
Reference in New Issue
Block a user