Skip to content

Commit 89e9331

Browse files
committed
The Logger can't be compiled on Windows
1 parent af40c57 commit 89e9331

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

source/hunt/logging/Logger.d

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,17 @@ class Logger
436436
try
437437
send(_tid, msg);
438438
catch (Exception ex) {
439-
collectException( {
440-
write(PRINT_COLOR_RED);
439+
version(Posix) {
440+
collectException( {
441+
write(PRINT_COLOR_RED);
442+
write(ex);
443+
writeln(PRINT_COLOR_NONE);
444+
}());
445+
} else {
446+
collectException( {
441447
write(ex);
442-
writeln(PRINT_COLOR_NONE);
443448
}());
449+
}
444450
}
445451
}
446452
}
@@ -688,6 +694,7 @@ protected:
688694
}
689695

690696
} else version (Windows) {
697+
import hunt.system.WindowsHelper;
691698
enum defaultColor = FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE;
692699

693700
ushort color;

0 commit comments

Comments
 (0)