Preparing for PluginLoader
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using System.IO;
|
||||
using RageCoop.Core.Scripting;
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using System;
|
||||
|
||||
namespace RageCoop.Client.Scripting
|
||||
{
|
||||
@ -15,7 +16,15 @@ namespace RageCoop.Client.Scripting
|
||||
{
|
||||
foreach (var s in d.Scripts)
|
||||
{
|
||||
Main.QueueAction(() => s.OnStart());
|
||||
try
|
||||
{
|
||||
s.OnStart();
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Logger.Error("Error occurred when starting script:"+s.GetType().FullName);
|
||||
Logger?.Error(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,7 +37,15 @@ namespace RageCoop.Client.Scripting
|
||||
{
|
||||
foreach (var s in d.Scripts)
|
||||
{
|
||||
Main.QueueAction(() => s.OnStop());
|
||||
try
|
||||
{
|
||||
s.OnStop();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error("Error occurred when stopping script:"+s.GetType().FullName);
|
||||
Logger?.Error(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user