Initialize ErrorHandler early and ensure immediate log file creation

- Added early initialization of `ErrorHandler` in `main.cc` for robust error handling.
- Modified `ErrorHandler` to create the log file immediately, ensuring its presence in the state directory.
- Simplified conditional checks for log file operations and updated timestamp handling to use `system_clock`.
This commit is contained in:
2026-02-26 13:25:57 -08:00
parent 27dcb41857
commit c261261e26
2 changed files with 10 additions and 12 deletions

View File

@@ -117,6 +117,9 @@ main(int argc, char *argv[])
{
std::setlocale(LC_ALL, "");
// Ensure the error handler (and its log file) is initialised early.
kte::ErrorHandler::Instance();
Editor editor;
// CLI parsing using getopt_long