output more error data
This commit is contained in:
parent
76fe65c08c
commit
114813400e
@ -5,6 +5,7 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace silverworker_discord
|
namespace silverworker_discord
|
||||||
{
|
{
|
||||||
@ -59,7 +60,13 @@ namespace silverworker_discord
|
|||||||
errorFilename = $"{dumpDir}/error{i}.err";
|
errorFilename = $"{dumpDir}/error{i}.err";
|
||||||
}
|
}
|
||||||
File.WriteAllText(outputFilename, outputData.ToString());
|
File.WriteAllText(outputFilename, outputData.ToString());
|
||||||
File.WriteAllText(errorFilename, errorFilename.ToString());
|
using(var sw =new StreamWriter(new FileStream(errorFilename, FileMode.Append, FileAccess.Write)))
|
||||||
|
{
|
||||||
|
sw.WriteLine("== my own error ==");
|
||||||
|
sw.WriteLine(JsonConvert.SerializeObject(e));
|
||||||
|
sw.WriteLine("== error log ==");
|
||||||
|
sw.WriteLine(errorData.ToString());
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user