28 #include "compiler/compileBroker.hpp" |
28 #include "compiler/compileBroker.hpp" |
29 #include "oops/oop.inline.hpp" |
29 #include "oops/oop.inline.hpp" |
30 #include "runtime/init.hpp" |
30 #include "runtime/init.hpp" |
31 #include "runtime/java.hpp" |
31 #include "runtime/java.hpp" |
32 #include "runtime/javaCalls.hpp" |
32 #include "runtime/javaCalls.hpp" |
|
33 #include "runtime/os.hpp" |
33 #include "runtime/thread.inline.hpp" |
34 #include "runtime/thread.inline.hpp" |
34 #include "runtime/threadCritical.hpp" |
35 #include "runtime/threadCritical.hpp" |
35 #include "utilities/events.hpp" |
36 #include "utilities/events.hpp" |
36 #include "utilities/exceptions.hpp" |
37 #include "utilities/exceptions.hpp" |
37 |
38 |
244 void Exceptions::fthrow(Thread* thread, const char* file, int line, Symbol* h_name, const char* format, ...) { |
245 void Exceptions::fthrow(Thread* thread, const char* file, int line, Symbol* h_name, const char* format, ...) { |
245 const int max_msg_size = 1024; |
246 const int max_msg_size = 1024; |
246 va_list ap; |
247 va_list ap; |
247 va_start(ap, format); |
248 va_start(ap, format); |
248 char msg[max_msg_size]; |
249 char msg[max_msg_size]; |
249 vsnprintf(msg, max_msg_size, format, ap); |
250 os::vsnprintf(msg, max_msg_size, format, ap); |
250 msg[max_msg_size-1] = '\0'; |
|
251 va_end(ap); |
251 va_end(ap); |
252 _throw_msg(thread, file, line, h_name, msg); |
252 _throw_msg(thread, file, line, h_name, msg); |
253 } |
253 } |
254 |
254 |
255 |
255 |