From d7e220cee1ac035dfaa742ffb2d671d709df8992 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 9 Sep 2009 22:35:40 +0200 Subject: [PATCH] Add a few fflush(stderr) calls to track down missing stacktraces. --- src/node.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node.cc b/src/node.cc index 55aee8317..f295cb6b8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -153,6 +153,7 @@ ReportException (TryCatch &try_catch) Handle message = try_catch.Message(); if (message.IsEmpty()) { fprintf(stderr, "Error: (no message)\n"); + fflush(stderr); return; } Handle error = try_catch.Exception(); @@ -192,6 +193,7 @@ ReportException (TryCatch &try_catch) String::Utf8Value trace(stack); fprintf(stderr, "%s\n", *trace); } + fflush(stderr); } // Executes a string within the current v8 context. @@ -238,6 +240,7 @@ node_exit (const v8::Arguments& args) int r = 0; if (args.Length() > 0) r = args[0]->IntegerValue(); + fflush(stderr); exit(r); return Undefined(); }