blob: 832eac6f283bf7f7d6c1260844aea84e7788e137 [file] [log] [blame]
Ian Rogers87e552d2012-08-31 15:54:48 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Brian Carlstromfc0e3212013-07-17 14:40:12 -070017#ifndef ART_RUNTIME_COMMON_THROWS_H_
18#define ART_RUNTIME_COMMON_THROWS_H_
Ian Rogers87e552d2012-08-31 15:54:48 -070019
Vladimir Marko72101082019-02-05 16:16:30 +000020#include <string_view>
21
Andreas Gampe7fbc4a52018-11-28 08:26:47 -080022#include "base/locks.h"
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -070023#include "obj_ptr.h"
Ian Rogers87e552d2012-08-31 15:54:48 -070024
25namespace art {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080026namespace mirror {
Igor Murashkin2ffb7032017-11-08 13:35:21 -080027class Class;
28class Object;
29class MethodType;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080030} // namespace mirror
Mathieu Chartierc7853442015-03-27 14:35:38 -070031class ArtField;
Mathieu Chartiere401d142015-04-22 13:56:20 -070032class ArtMethod;
Alex Light705ad492015-09-21 11:36:30 -070033class DexFile;
Andreas Gampe04c6ab92017-06-08 21:49:14 -070034enum InvokeType : uint32_t;
Ian Rogersd91d6d62013-09-25 20:26:14 -070035class Signature;
Ian Rogers87e552d2012-08-31 15:54:48 -070036
Sebastien Hertz56adf602013-07-09 17:27:07 +020037// AbstractMethodError
38
Mathieu Chartiere401d142015-04-22 13:56:20 -070039void ThrowAbstractMethodError(ArtMethod* method)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070040 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Sebastien Hertz56adf602013-07-09 17:27:07 +020041
Alex Light705ad492015-09-21 11:36:30 -070042void ThrowAbstractMethodError(uint32_t method_idx, const DexFile& dex_file)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070043 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Alex Light705ad492015-09-21 11:36:30 -070044
Ian Rogers62d6c772013-02-27 08:32:07 -080045// ArithmeticException
Ian Rogers87e552d2012-08-31 15:54:48 -070046
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070047void ThrowArithmeticExceptionDivideByZero() REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -080048
49// ArrayIndexOutOfBoundsException
50
51void ThrowArrayIndexOutOfBoundsException(int index, int length)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070052 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -070053
Ian Rogers62d6c772013-02-27 08:32:07 -080054// ArrayStoreException
55
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -070056void ThrowArrayStoreException(ObjPtr<mirror::Class> element_class,
57 ObjPtr<mirror::Class> array_class)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070058 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -070059
Orion Hodsonc069a302017-01-18 09:23:12 +000060// BootstrapMethodError
61
62void ThrowBootstrapMethodError(const char* fmt, ...)
63 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
64
65void ThrowWrappedBootstrapMethodError(const char* fmt, ...)
66 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
67
Ian Rogers62d6c772013-02-27 08:32:07 -080068// ClassCircularityError
69
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -070070void ThrowClassCircularityError(ObjPtr<mirror::Class> c)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070071 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -080072
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -070073void ThrowClassCircularityError(ObjPtr<mirror::Class> c, const char* fmt, ...)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070074 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Roland Levillain989ab3b2016-05-18 15:52:54 +010075
Ian Rogers62d6c772013-02-27 08:32:07 -080076// ClassCastException
77
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -070078void ThrowClassCastException(ObjPtr<mirror::Class> dest_type, ObjPtr<mirror::Class> src_type)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070079 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -080080
Nicolas Geoffray0aa50ce2015-03-10 11:03:29 +000081void ThrowClassCastException(const char* msg)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070082 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -080083
84// ClassFormatError
85
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -070086void ThrowClassFormatError(ObjPtr<mirror::Class> referrer, const char* fmt, ...)
Ian Rogers62d6c772013-02-27 08:32:07 -080087 __attribute__((__format__(__printf__, 2, 3)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070088 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -070089
90// IllegalAccessError
91
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -070092void ThrowIllegalAccessErrorClass(ObjPtr<mirror::Class> referrer, ObjPtr<mirror::Class> accessed)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070093 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -070094
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -070095void ThrowIllegalAccessErrorClassForMethodDispatch(ObjPtr<mirror::Class> referrer,
96 ObjPtr<mirror::Class> accessed,
Mathieu Chartiere401d142015-04-22 13:56:20 -070097 ArtMethod* called,
Ian Rogers87e552d2012-08-31 15:54:48 -070098 InvokeType type)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -070099 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700100
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700101void ThrowIllegalAccessErrorMethod(ObjPtr<mirror::Class> referrer, ArtMethod* accessed)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700102 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700103
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700104void ThrowIllegalAccessErrorField(ObjPtr<mirror::Class> referrer, ArtField* accessed)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700105 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700106
Mathieu Chartiere401d142015-04-22 13:56:20 -0700107void ThrowIllegalAccessErrorFinalField(ArtMethod* referrer, ArtField* accessed)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700108 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700109
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700110void ThrowIllegalAccessError(ObjPtr<mirror::Class> referrer, const char* fmt, ...)
Ian Rogers62d6c772013-02-27 08:32:07 -0800111 __attribute__((__format__(__printf__, 2, 3)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700112 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800113
Jeff Hao11d5d8f2014-03-26 15:08:20 -0700114// IllegalAccessException
115
Nicolas Geoffray0aa50ce2015-03-10 11:03:29 +0000116void ThrowIllegalAccessException(const char* msg)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700117 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Jeff Hao11d5d8f2014-03-26 15:08:20 -0700118
Ian Rogers62d6c772013-02-27 08:32:07 -0800119// IllegalArgumentException
120
Nicolas Geoffray0aa50ce2015-03-10 11:03:29 +0000121void ThrowIllegalArgumentException(const char* msg)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700122 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800123
Orion Hodson928033d2018-02-07 05:30:54 +0000124// IllegalAccessException
125
126void ThrowIllegalStateException(const char* msg)
127 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
128
Ian Rogers87e552d2012-08-31 15:54:48 -0700129// IncompatibleClassChangeError
130
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700131void ThrowIncompatibleClassChangeError(InvokeType expected_type,
132 InvokeType found_type,
133 ArtMethod* method,
134 ArtMethod* referrer)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700135 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700136
Alex Light705ad492015-09-21 11:36:30 -0700137void ThrowIncompatibleClassChangeErrorClassForInterfaceSuper(ArtMethod* method,
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700138 ObjPtr<mirror::Class> target_class,
139 ObjPtr<mirror::Object> this_object,
Alex Light705ad492015-09-21 11:36:30 -0700140 ArtMethod* referrer)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700141 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Alex Light705ad492015-09-21 11:36:30 -0700142
Mathieu Chartiere401d142015-04-22 13:56:20 -0700143void ThrowIncompatibleClassChangeErrorClassForInterfaceDispatch(ArtMethod* interface_method,
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700144 ObjPtr<mirror::Object> this_object,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700145 ArtMethod* referrer)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700146 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700147
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700148void ThrowIncompatibleClassChangeErrorField(ArtField* resolved_field,
149 bool is_static,
Mathieu Chartiere401d142015-04-22 13:56:20 -0700150 ArtMethod* referrer)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700151 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700152
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700153void ThrowIncompatibleClassChangeError(ObjPtr<mirror::Class> referrer, const char* fmt, ...)
Ian Rogers62d6c772013-02-27 08:32:07 -0800154 __attribute__((__format__(__printf__, 2, 3)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700155 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers8d31bbd2013-10-13 10:44:14 -0700156
Alex Light9139e002015-10-09 15:59:48 -0700157void ThrowIncompatibleClassChangeErrorForMethodConflict(ArtMethod* method)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700158 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Alex Light9139e002015-10-09 15:59:48 -0700159
Orion Hodson928033d2018-02-07 05:30:54 +0000160// IndexOutOfBoundsException
161
162void ThrowIndexOutOfBoundsException(int index, int length)
163 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
164
Alex Lightdb01a092017-04-03 15:39:55 -0700165// InternalError
166
167void ThrowInternalError(const char* fmt, ...)
168 __attribute__((__format__(__printf__, 1, 2)))
169 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
170
Ian Rogers8d31bbd2013-10-13 10:44:14 -0700171// IOException
172
173void ThrowIOException(const char* fmt, ...) __attribute__((__format__(__printf__, 1, 2)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700174 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800175
Andreas Gampe329d1882014-04-08 10:32:19 -0700176void ThrowWrappedIOException(const char* fmt, ...) __attribute__((__format__(__printf__, 1, 2)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700177 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Andreas Gampe329d1882014-04-08 10:32:19 -0700178
Ian Rogers62d6c772013-02-27 08:32:07 -0800179// LinkageError
180
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700181void ThrowLinkageError(ObjPtr<mirror::Class> referrer, const char* fmt, ...)
Ian Rogers62d6c772013-02-27 08:32:07 -0800182 __attribute__((__format__(__printf__, 2, 3)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700183 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800184
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700185void ThrowWrappedLinkageError(ObjPtr<mirror::Class> referrer, const char* fmt, ...)
Vladimir Markod5e5a0e2015-05-08 12:26:59 +0100186 __attribute__((__format__(__printf__, 2, 3)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700187 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Vladimir Markod5e5a0e2015-05-08 12:26:59 +0100188
Ian Rogers62d6c772013-02-27 08:32:07 -0800189// NegativeArraySizeException
190
Ian Rogers8d31bbd2013-10-13 10:44:14 -0700191void ThrowNegativeArraySizeException(int size)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700192 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800193
Ian Rogers8d31bbd2013-10-13 10:44:14 -0700194void ThrowNegativeArraySizeException(const char* msg)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700195 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800196
197
198// NoSuchFieldError
199
Vladimir Marko72101082019-02-05 16:16:30 +0000200void ThrowNoSuchFieldError(std::string_view scope,
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700201 ObjPtr<mirror::Class> c,
Vladimir Marko72101082019-02-05 16:16:30 +0000202 std::string_view type,
203 std::string_view name)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700204 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800205
Vladimir Marko72101082019-02-05 16:16:30 +0000206void ThrowNoSuchFieldException(ObjPtr<mirror::Class> c, std::string_view name)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700207 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Mathieu Chartier4e067782015-05-13 13:13:24 -0700208
Ian Rogers87e552d2012-08-31 15:54:48 -0700209// NoSuchMethodError
210
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700211void ThrowNoSuchMethodError(InvokeType type,
212 ObjPtr<mirror::Class> c,
Vladimir Marko72101082019-02-05 16:16:30 +0000213 std::string_view name,
Ian Rogersd91d6d62013-09-25 20:26:14 -0700214 const Signature& signature)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700215 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700216
Ian Rogers62d6c772013-02-27 08:32:07 -0800217// NullPointerException
218
Mathieu Chartierc7853442015-03-27 14:35:38 -0700219void ThrowNullPointerExceptionForFieldAccess(ArtField* field,
Ian Rogers62d6c772013-02-27 08:32:07 -0800220 bool is_read)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700221 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800222
Nicolas Geoffray0aa50ce2015-03-10 11:03:29 +0000223void ThrowNullPointerExceptionForMethodAccess(uint32_t method_idx,
Ian Rogers62d6c772013-02-27 08:32:07 -0800224 InvokeType type)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700225 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800226
Mathieu Chartiere401d142015-04-22 13:56:20 -0700227void ThrowNullPointerExceptionForMethodAccess(ArtMethod* method,
Sebastien Hertz2d6ba512013-05-17 11:31:37 +0200228 InvokeType type)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700229 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Sebastien Hertz2d6ba512013-05-17 11:31:37 +0200230
Nicolas Geoffraye8e11272016-06-28 18:08:46 +0100231void ThrowNullPointerExceptionFromDexPC(bool check_address = false, uintptr_t addr = 0)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700232 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800233
Nicolas Geoffray0aa50ce2015-03-10 11:03:29 +0000234void ThrowNullPointerException(const char* msg)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700235 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800236
Nicolas Geoffray635967b2019-08-07 10:15:39 +0100237void ThrowNullPointerException()
238 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
239
Orion Hodson928033d2018-02-07 05:30:54 +0000240// ReadOnlyBufferException
241
242void ThrowReadOnlyBufferException() REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
243
Ian Rogers62d6c772013-02-27 08:32:07 -0800244// RuntimeException
245
246void ThrowRuntimeException(const char* fmt, ...)
247 __attribute__((__format__(__printf__, 1, 2)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700248 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers62d6c772013-02-27 08:32:07 -0800249
Leonard Mosescueb842212016-10-06 17:26:36 -0700250// SecurityException
251
252void ThrowSecurityException(const char* fmt, ...)
253 __attribute__((__format__(__printf__, 1, 2)))
254 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
255
Andreas Gampe103992b2016-01-04 15:32:43 -0800256// Stack overflow.
257
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700258void ThrowStackOverflowError(Thread* self) REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Andreas Gampe103992b2016-01-04 15:32:43 -0800259
Vladimir Marko87f3fcb2016-04-28 15:52:11 +0100260// StringIndexOutOfBoundsException
261
262void ThrowStringIndexOutOfBoundsException(int index, int length)
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700263 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Vladimir Marko87f3fcb2016-04-28 15:52:11 +0100264
Orion Hodson928033d2018-02-07 05:30:54 +0000265// UnsupportedOperationException
266
267void ThrowUnsupportedOperationException() REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
268
Ian Rogers62d6c772013-02-27 08:32:07 -0800269// VerifyError
270
Mathieu Chartier6b3d12b2016-10-13 13:59:58 -0700271void ThrowVerifyError(ObjPtr<mirror::Class> referrer, const char* fmt, ...)
Ian Rogers62d6c772013-02-27 08:32:07 -0800272 __attribute__((__format__(__printf__, 2, 3)))
Andreas Gampebdf7f1c2016-08-30 16:38:47 -0700273 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
Ian Rogers87e552d2012-08-31 15:54:48 -0700274
Orion Hodsonc069a302017-01-18 09:23:12 +0000275// WrongMethodTypeException
Orion Hodson928033d2018-02-07 05:30:54 +0000276
Orion Hodsona5dca522018-02-27 12:42:11 +0000277void ThrowWrongMethodTypeException(ObjPtr<mirror::MethodType> callee_type,
278 ObjPtr<mirror::MethodType> callsite_type)
Narayan Kamath208f8572016-08-03 12:46:58 +0100279 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
280
Orion Hodson3f383462018-05-17 14:03:39 +0100281void ThrowWrongMethodTypeException(const std::string& expected_descriptor,
282 const std::string& actual_descriptor)
283 REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR;
284
Ian Rogers87e552d2012-08-31 15:54:48 -0700285} // namespace art
286
Brian Carlstromfc0e3212013-07-17 14:40:12 -0700287#endif // ART_RUNTIME_COMMON_THROWS_H_