Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
When dumping an exception stack on windows, better check for redirect…
Browse files Browse the repository at this point in the history
…ion of stderr
  • Loading branch information
rainers committed May 31, 2015
1 parent dc82475 commit c2f4862
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rt/dmain2.d
Expand Up @@ -517,7 +517,10 @@ extern (C) void _d_print_throwable(Throwable t)
// Show a message box instead.
version (Windows)
{
if (!GetConsoleWindow())
// ensure the exception is shown at the beginning of the line, while also
// checking whether stderr is a valid file
int written = fprintf(stderr, "\n");
if (written <= 0)
{
static struct WSink
{
Expand Down

0 comments on commit c2f4862

Please sign in to comment.