Mercurial > hg > truffle
comparison src/share/vm/classfile/classFileParser.hpp @ 10147:cc70cbbd422e
8012695: Assertion message displays %u and %s text instead of actual values
Summary: USe err_msg() to create a proper assertion message.
Reviewed-by: twisti, coleenp, iklam
author | hseigel |
---|---|
date | Wed, 24 Apr 2013 09:00:04 -0400 |
parents | 9befe2fce567 |
children | e22ee8e7ae62 |
comparison
equal
deleted
inserted
replaced
10138:1ea6a35dcbe5 | 10147:cc70cbbd422e |
---|---|
302 if (!b) { classfile_parse_error(msg, CHECK); } | 302 if (!b) { classfile_parse_error(msg, CHECK); } |
303 } | 303 } |
304 | 304 |
305 inline void assert_property(bool b, const char* msg, TRAPS) { | 305 inline void assert_property(bool b, const char* msg, TRAPS) { |
306 #ifdef ASSERT | 306 #ifdef ASSERT |
307 if (!b) { fatal(msg); } | 307 if (!b) { |
308 ResourceMark rm(THREAD); | |
309 fatal(err_msg(msg, _class_name->as_C_string())); | |
310 } | |
311 #endif | |
312 } | |
313 | |
314 inline void assert_property(bool b, const char* msg, int index, TRAPS) { | |
315 #ifdef ASSERT | |
316 if (!b) { | |
317 ResourceMark rm(THREAD); | |
318 fatal(err_msg(msg, index, _class_name->as_C_string())); | |
319 } | |
308 #endif | 320 #endif |
309 } | 321 } |
310 | 322 |
311 inline void check_property(bool property, const char* msg, int index, TRAPS) { | 323 inline void check_property(bool property, const char* msg, int index, TRAPS) { |
312 if (_need_verify) { | 324 if (_need_verify) { |
313 guarantee_property(property, msg, index, CHECK); | 325 guarantee_property(property, msg, index, CHECK); |
314 } else { | 326 } else { |
315 assert_property(property, msg, CHECK); | 327 assert_property(property, msg, index, CHECK); |
316 } | 328 } |
317 } | 329 } |
318 | 330 |
319 inline void check_property(bool property, const char* msg, TRAPS) { | 331 inline void check_property(bool property, const char* msg, TRAPS) { |
320 if (_need_verify) { | 332 if (_need_verify) { |