feat: indicate if exception was included, but none happened

This commit is contained in:
goaaats 2021-10-07 20:28:38 +02:00
parent 02719126f3
commit 7b0895719f
No known key found for this signature in database
GPG key ID: F18F057873895461

View file

@ -39,7 +39,9 @@ namespace Dalamud.Support
}; };
if (includeException) if (includeException)
model.Exception = Troubleshooting.LastException?.ToString(); {
model.Exception = Troubleshooting.LastException == null ? "Was included, but none happened" : Troubleshooting.LastException?.ToString();
}
var postContent = new StringContent(JsonConvert.SerializeObject(model), Encoding.UTF8, "application/json"); var postContent = new StringContent(JsonConvert.SerializeObject(model), Encoding.UTF8, "application/json");
var response = await client.PostAsync(BugBaitUrl, postContent); var response = await client.PostAsync(BugBaitUrl, postContent);