equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
127 |
127 |
128 // This method should only be called from generated code, |
128 // This method should only be called from generated code, |
129 // therefore the exception oop should be in the oopmap. |
129 // therefore the exception oop should be in the oopmap. |
130 void Exceptions::_throw_oop(Thread* thread, const char* file, int line, oop exception) { |
130 void Exceptions::_throw_oop(Thread* thread, const char* file, int line, oop exception) { |
131 assert(exception != NULL, "exception should not be NULL"); |
131 assert(exception != NULL, "exception should not be NULL"); |
132 Handle h_exception = Handle(thread, exception); |
132 Handle h_exception(thread, exception); |
133 _throw(thread, file, line, h_exception); |
133 _throw(thread, file, line, h_exception); |
134 } |
134 } |
135 |
135 |
136 void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exception, const char* message) { |
136 void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exception, const char* message) { |
137 ResourceMark rm; |
137 ResourceMark rm; |
494 } |
494 } |
495 |
495 |
496 void Exceptions::debug_check_abort_helper(Handle exception, const char* message) { |
496 void Exceptions::debug_check_abort_helper(Handle exception, const char* message) { |
497 ResourceMark rm; |
497 ResourceMark rm; |
498 if (message == NULL && exception->is_a(SystemDictionary::Throwable_klass())) { |
498 if (message == NULL && exception->is_a(SystemDictionary::Throwable_klass())) { |
499 oop msg = java_lang_Throwable::message(exception); |
499 oop msg = java_lang_Throwable::message(exception()); |
500 if (msg != NULL) { |
500 if (msg != NULL) { |
501 message = java_lang_String::as_utf8_string(msg); |
501 message = java_lang_String::as_utf8_string(msg); |
502 } |
502 } |
503 } |
503 } |
504 debug_check_abort(exception()->klass()->external_name(), message); |
504 debug_check_abort(exception()->klass()->external_name(), message); |