Mercurial > hg > truffle
comparison src/share/vm/utilities/exceptions.cpp @ 3464:be4ca325525a
Merge.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Jul 2011 17:32:44 -0700 |
parents | 0654ee04b214 01147d8aac1d |
children | 04b9a2566eec |
comparison
equal
deleted
inserted
replaced
3239:7c4b4daac19b | 3464:be4ca325525a |
---|---|
207 Handle exception = new_exception(thread, h_name, h_signature, args, h_cause, h_loader, h_prot); | 207 Handle exception = new_exception(thread, h_name, h_signature, args, h_cause, h_loader, h_prot); |
208 _throw(thread, file, line, exception); | 208 _throw(thread, file, line, exception); |
209 } | 209 } |
210 | 210 |
211 | 211 |
212 void Exceptions::throw_stack_overflow_exception(Thread* THREAD, const char* file, int line) { | 212 void Exceptions::throw_stack_overflow_exception(Thread* THREAD, const char* file, int line, methodHandle method) { |
213 Handle exception; | 213 Handle exception; |
214 if (!THREAD->has_pending_exception()) { | 214 if (!THREAD->has_pending_exception()) { |
215 klassOop k = SystemDictionary::StackOverflowError_klass(); | 215 klassOop k = SystemDictionary::StackOverflowError_klass(); |
216 oop e = instanceKlass::cast(k)->allocate_instance(CHECK); | 216 oop e = instanceKlass::cast(k)->allocate_instance(CHECK); |
217 exception = Handle(THREAD, e); // fill_in_stack trace does gc | 217 exception = Handle(THREAD, e); // fill_in_stack trace does gc |
218 assert(instanceKlass::cast(k)->is_initialized(), "need to increase min_stack_allowed calculation"); | 218 assert(instanceKlass::cast(k)->is_initialized(), "need to increase min_stack_allowed calculation"); |
219 if (StackTraceInThrowable) { | 219 if (StackTraceInThrowable) { |
220 java_lang_Throwable::fill_in_stack_trace(exception); | 220 java_lang_Throwable::fill_in_stack_trace(exception, method()); |
221 } | 221 } |
222 } else { | 222 } else { |
223 // if prior exception, throw that one instead | 223 // if prior exception, throw that one instead |
224 exception = Handle(THREAD, THREAD->pending_exception()); | 224 exception = Handle(THREAD, THREAD->pending_exception()); |
225 } | 225 } |
226 _throw_oop(THREAD, file, line, exception()); | 226 _throw(THREAD, file, line, exception); |
227 } | 227 } |
228 | 228 |
229 void Exceptions::fthrow(Thread* thread, const char* file, int line, Symbol* h_name, const char* format, ...) { | 229 void Exceptions::fthrow(Thread* thread, const char* file, int line, Symbol* h_name, const char* format, ...) { |
230 const int max_msg_size = 1024; | 230 const int max_msg_size = 1024; |
231 va_list ap; | 231 va_list ap; |