mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
7199082: write warning messages to stderr
Reviewed-by: ysr, dholmes, sla
This commit is contained in:
parent
5721eadb16
commit
1743a11163
1 changed files with 4 additions and 5 deletions
|
@ -101,14 +101,13 @@ FormatBufferResource::FormatBufferResource(const char * format, ...)
|
|||
|
||||
void warning(const char* format, ...) {
|
||||
if (PrintWarnings) {
|
||||
// In case error happens before init or during shutdown
|
||||
if (tty == NULL) ostream_init();
|
||||
|
||||
tty->print("%s warning: ", VM_Version::vm_name());
|
||||
FILE* const err = defaultStream::error_stream();
|
||||
jio_fprintf(err, "%s warning: ", VM_Version::vm_name());
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
tty->vprint_cr(format, ap);
|
||||
vfprintf(err, format, ap);
|
||||
va_end(ap);
|
||||
fputc('\n', err);
|
||||
}
|
||||
if (BreakAtWarning) BREAKPOINT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue