提交 2c5950a1 编写于 作者: J jcoomes

7199082: write warning messages to stderr

Reviewed-by: ysr, dholmes, sla
上级 c78b4235
...@@ -101,14 +101,13 @@ FormatBufferResource::FormatBufferResource(const char * format, ...) ...@@ -101,14 +101,13 @@ FormatBufferResource::FormatBufferResource(const char * format, ...)
void warning(const char* format, ...) { void warning(const char* format, ...) {
if (PrintWarnings) { if (PrintWarnings) {
// In case error happens before init or during shutdown FILE* const err = defaultStream::error_stream();
if (tty == NULL) ostream_init(); jio_fprintf(err, "%s warning: ", VM_Version::vm_name());
tty->print("%s warning: ", VM_Version::vm_name());
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);
tty->vprint_cr(format, ap); vfprintf(err, format, ap);
va_end(ap); va_end(ap);
fputc('\n', err);
} }
if (BreakAtWarning) BREAKPOINT; if (BreakAtWarning) BREAKPOINT;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册