Fixed the Logging system to actually be able to handle errors. Database is also fixed to use directories.

This commit is contained in:
2024-04-23 22:29:49 -07:00
parent 2734cc00fb
commit f030ac62ae
61 changed files with 884 additions and 602 deletions

View File

@@ -211,7 +211,7 @@ namespace ehs
{
if (!isIndex)
{
EHS_LOG_INT("Error", 0, "Index has ended, but never started.");
EHS_LOG_INT(LogType::ERR, 0, "Index has ended, but never started.");
return levels;
}
@@ -219,7 +219,7 @@ namespace ehs
levels.Push(Str_8(start, i - start));
else
{
EHS_LOG_INT("Error", 1, "Index has no value.");
EHS_LOG_INT(LogType::ERR, 1, "Index has no value.");
return levels;
}
@@ -228,7 +228,7 @@ namespace ehs
}
else if (isIndex && (*i < '0' || *i > '9'))
{
EHS_LOG_INT("Error", 2, "Index has an invalid character, \"" + Str_8(i, 1) + "\". Index must be a whole number.");
EHS_LOG_INT(LogType::ERR, 2, "Index has an invalid character, \"" + Str_8(i, 1) + "\". Index must be a whole number.");
return levels;
}
else if (*i == '.')
@@ -240,7 +240,7 @@ namespace ehs
}
else if (!isIndex && *i != '-' && *i != '_' && (*i < 'A' || *i > 'Z') && (*i < 'a' || *i > 'z'))
{
EHS_LOG_INT("Error", 3, "Member variable has an invalid character, \"" + Str_8(i, 1) + "\".");
EHS_LOG_INT(LogType::ERR, 3, "Member variable has an invalid character, \"" + Str_8(i, 1) + "\".");
return levels;
}
}