767 } |
767 } |
768 |
768 |
769 void ConstantPool::throw_resolution_error(const constantPoolHandle& this_cp, int which, TRAPS) { |
769 void ConstantPool::throw_resolution_error(const constantPoolHandle& this_cp, int which, TRAPS) { |
770 Symbol* message = NULL; |
770 Symbol* message = NULL; |
771 Symbol* error = SystemDictionary::find_resolution_error(this_cp, which, &message); |
771 Symbol* error = SystemDictionary::find_resolution_error(this_cp, which, &message); |
772 assert(error != NULL && message != NULL, "checking"); |
772 assert(error != NULL, "checking"); |
773 CLEAR_PENDING_EXCEPTION; |
773 CLEAR_PENDING_EXCEPTION; |
774 ResourceMark rm; |
774 if (message != NULL) { |
775 THROW_MSG(error, message->as_C_string()); |
775 ResourceMark rm; |
|
776 THROW_MSG(error, message->as_C_string()); |
|
777 } else { |
|
778 THROW(error); |
|
779 } |
776 } |
780 } |
777 |
781 |
778 // If resolution for Class, Dynamic constant, MethodHandle or MethodType fails, save the |
782 // If resolution for Class, Dynamic constant, MethodHandle or MethodType fails, save the |
779 // exception in the resolution error table, so that the same exception is thrown again. |
783 // exception in the resolution error table, so that the same exception is thrown again. |
780 void ConstantPool::save_and_throw_exception(const constantPoolHandle& this_cp, int which, |
784 void ConstantPool::save_and_throw_exception(const constantPoolHandle& this_cp, int which, |