add error message for unknown test log level

It would previously just be a compilation error about a missing
return statement.
This commit is contained in:
Laytan Laats
2024-06-07 15:13:09 +02:00
parent 68781f8dd3
commit ee93d7c05e

View File

@@ -53,6 +53,9 @@ get_log_level :: #force_inline proc() -> runtime.Logger_Level {
else when LOG_LEVEL == "warning" { return .Warning }
else when LOG_LEVEL == "error" { return .Error }
else when LOG_LEVEL == "fatal" { return .Fatal }
else {
#panic("Unknown `ODIN_TEST_LOG_LEVEL`: \"" + LOG_LEVEL + "\", possible levels are: \"debug\", \"info\", \"warning\", \"error\", or \"fatal\".")
}
}
}