Simplify error logging

This commit is contained in:
Akkadius
2019-09-01 22:05:44 -05:00
parent 98cbb7d781
commit 678c25e02c
44 changed files with 532 additions and 486 deletions
+3 -3
View File
@@ -251,7 +251,7 @@ void PathfinderWaypoint::Load(const std::string &filename) {
if (strncmp(Magic, "EQEMUPATH", 9))
{
Log(Logs::General, Logs::Error, "Bad Magic String in .path file.");
LogError("Bad Magic String in .path file");
fclose(f);
return;
}
@@ -271,7 +271,7 @@ void PathfinderWaypoint::Load(const std::string &filename) {
return;
}
else {
Log(Logs::General, Logs::Error, "Unsupported path file version.");
LogError("Unsupported path file version");
fclose(f);
return;
}
@@ -306,7 +306,7 @@ void PathfinderWaypoint::LoadV2(FILE *f, const PathFileHeader &header)
auto &node = m_impl->Nodes[i];
if (PathNodes[i].Neighbours[j].id > MaxNodeID)
{
Log(Logs::General, Logs::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id);
LogError("Path Node [{}], Neighbour [{}] ([{}]) out of range", i, j, PathNodes[i].Neighbours[j].id);
m_impl->PathFileValid = false;
}