Open Nielsbishere opened 6 months ago
_ERROR_LEVEL at compile-time to decide what needs error checking. For example: ERROR_LEVEL_FATAL might be for things that cause fatal issues (memory corruption, etc.) ERROR_LEVEL_ERROR for things that are one level below fatal but still very important ERROR_LEVEL_UNDEFINED_BEHAVIOR things that could cause undefined behavior on certain systems ERROR_LEVEL_WARN for things that might cause issues ERROR_LEVEL_PERFORMANCE for things that might have a negative performance impact
At runtime in production, likely ERROR_LEVEL_ERROR should be used, to prevent unnecessary time spent on sanity checks.
Error* to make it optional and return Bool. This should be refactored through the entire codebase to reduce the amount of random Error structs being generated.