Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 1 | /* |
| 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 Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 17 | #ifndef ART_RUNTIME_COMMON_THROWS_H_ |
| 18 | #define ART_RUNTIME_COMMON_THROWS_H_ |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 19 | |
Elliott Hughes | 76b6167 | 2012-12-12 17:47:30 -0800 | [diff] [blame] | 20 | #include "base/mutex.h" |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 21 | #include "invoke_type.h" |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 22 | |
| 23 | namespace art { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 24 | namespace mirror { |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 25 | class Class; |
| 26 | class Object; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 27 | } // namespace mirror |
Mathieu Chartier | c785344 | 2015-03-27 14:35:38 -0700 | [diff] [blame] | 28 | class ArtField; |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 29 | class ArtMethod; |
Ian Rogers | d91d6d6 | 2013-09-25 20:26:14 -0700 | [diff] [blame] | 30 | class Signature; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 31 | class StringPiece; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 32 | |
Sebastien Hertz | 56adf60 | 2013-07-09 17:27:07 +0200 | [diff] [blame] | 33 | // AbstractMethodError |
| 34 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 35 | void ThrowAbstractMethodError(ArtMethod* method) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 36 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Sebastien Hertz | 56adf60 | 2013-07-09 17:27:07 +0200 | [diff] [blame] | 37 | |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 38 | // ArithmeticException |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 39 | |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 40 | void ThrowArithmeticExceptionDivideByZero() SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 41 | |
| 42 | // ArrayIndexOutOfBoundsException |
| 43 | |
| 44 | void ThrowArrayIndexOutOfBoundsException(int index, int length) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 45 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 46 | |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 47 | // ArrayStoreException |
| 48 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 49 | void ThrowArrayStoreException(mirror::Class* element_class, mirror::Class* array_class) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 50 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 51 | |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 52 | // ClassCircularityError |
| 53 | |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 54 | void ThrowClassCircularityError(mirror::Class* c) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 55 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 56 | |
| 57 | // ClassCastException |
| 58 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 59 | void ThrowClassCastException(mirror::Class* dest_type, mirror::Class* src_type) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 60 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 61 | |
Nicolas Geoffray | 0aa50ce | 2015-03-10 11:03:29 +0000 | [diff] [blame] | 62 | void ThrowClassCastException(const char* msg) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 63 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 64 | |
| 65 | // ClassFormatError |
| 66 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 67 | void ThrowClassFormatError(mirror::Class* referrer, const char* fmt, ...) |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 68 | __attribute__((__format__(__printf__, 2, 3))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 69 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 70 | |
| 71 | // IllegalAccessError |
| 72 | |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 73 | void ThrowIllegalAccessErrorClass(mirror::Class* referrer, mirror::Class* accessed) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 74 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 75 | |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 76 | void ThrowIllegalAccessErrorClassForMethodDispatch(mirror::Class* referrer, mirror::Class* accessed, |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 77 | ArtMethod* called, |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 78 | InvokeType type) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 79 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 80 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 81 | void ThrowIllegalAccessErrorMethod(mirror::Class* referrer, ArtMethod* accessed) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 82 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 83 | |
Mathieu Chartier | c785344 | 2015-03-27 14:35:38 -0700 | [diff] [blame] | 84 | void ThrowIllegalAccessErrorField(mirror::Class* referrer, ArtField* accessed) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 85 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 86 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 87 | void ThrowIllegalAccessErrorFinalField(ArtMethod* referrer, ArtField* accessed) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 88 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 89 | |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 90 | void ThrowIllegalAccessError(mirror::Class* referrer, const char* fmt, ...) |
| 91 | __attribute__((__format__(__printf__, 2, 3))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 92 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 93 | |
Jeff Hao | 11d5d8f | 2014-03-26 15:08:20 -0700 | [diff] [blame] | 94 | // IllegalAccessException |
| 95 | |
Nicolas Geoffray | 0aa50ce | 2015-03-10 11:03:29 +0000 | [diff] [blame] | 96 | void ThrowIllegalAccessException(const char* msg) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 97 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Jeff Hao | 11d5d8f | 2014-03-26 15:08:20 -0700 | [diff] [blame] | 98 | |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 99 | // IllegalArgumentException |
| 100 | |
Nicolas Geoffray | 0aa50ce | 2015-03-10 11:03:29 +0000 | [diff] [blame] | 101 | void ThrowIllegalArgumentException(const char* msg) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 102 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 103 | |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 104 | // IncompatibleClassChangeError |
| 105 | |
| 106 | void ThrowIncompatibleClassChangeError(InvokeType expected_type, InvokeType found_type, |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 107 | ArtMethod* method, ArtMethod* referrer) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 108 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 109 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 110 | void ThrowIncompatibleClassChangeErrorClassForInterfaceDispatch(ArtMethod* interface_method, |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 111 | mirror::Object* this_object, |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 112 | ArtMethod* referrer) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 113 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 114 | |
Mathieu Chartier | c785344 | 2015-03-27 14:35:38 -0700 | [diff] [blame] | 115 | void ThrowIncompatibleClassChangeErrorField(ArtField* resolved_field, bool is_static, |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 116 | ArtMethod* referrer) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 117 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 118 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 119 | void ThrowIncompatibleClassChangeError(mirror::Class* referrer, const char* fmt, ...) |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 120 | __attribute__((__format__(__printf__, 2, 3))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 121 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 122 | |
| 123 | // IOException |
| 124 | |
| 125 | void ThrowIOException(const char* fmt, ...) __attribute__((__format__(__printf__, 1, 2))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 126 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 127 | |
Andreas Gampe | 329d188 | 2014-04-08 10:32:19 -0700 | [diff] [blame] | 128 | void ThrowWrappedIOException(const char* fmt, ...) __attribute__((__format__(__printf__, 1, 2))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 129 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Andreas Gampe | 329d188 | 2014-04-08 10:32:19 -0700 | [diff] [blame] | 130 | |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 131 | // LinkageError |
| 132 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 133 | void ThrowLinkageError(mirror::Class* referrer, const char* fmt, ...) |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 134 | __attribute__((__format__(__printf__, 2, 3))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 135 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 136 | |
Vladimir Marko | d5e5a0e | 2015-05-08 12:26:59 +0100 | [diff] [blame] | 137 | void ThrowWrappedLinkageError(mirror::Class* referrer, const char* fmt, ...) |
| 138 | __attribute__((__format__(__printf__, 2, 3))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 139 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Vladimir Marko | d5e5a0e | 2015-05-08 12:26:59 +0100 | [diff] [blame] | 140 | |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 141 | // NegativeArraySizeException |
| 142 | |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 143 | void ThrowNegativeArraySizeException(int size) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 144 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 145 | |
Ian Rogers | 8d31bbd | 2013-10-13 10:44:14 -0700 | [diff] [blame] | 146 | void ThrowNegativeArraySizeException(const char* msg) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 147 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 148 | |
| 149 | |
| 150 | // NoSuchFieldError |
| 151 | |
| 152 | void ThrowNoSuchFieldError(const StringPiece& scope, mirror::Class* c, |
| 153 | const StringPiece& type, const StringPiece& name) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 154 | SHARED_REQUIRES(Locks::mutator_lock_); |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 155 | |
Mathieu Chartier | 4e06778 | 2015-05-13 13:13:24 -0700 | [diff] [blame] | 156 | void ThrowNoSuchFieldException(mirror::Class* c, const StringPiece& name) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 157 | SHARED_REQUIRES(Locks::mutator_lock_); |
Mathieu Chartier | 4e06778 | 2015-05-13 13:13:24 -0700 | [diff] [blame] | 158 | |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 159 | // NoSuchMethodError |
| 160 | |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 161 | void ThrowNoSuchMethodError(InvokeType type, mirror::Class* c, const StringPiece& name, |
Ian Rogers | d91d6d6 | 2013-09-25 20:26:14 -0700 | [diff] [blame] | 162 | const Signature& signature) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 163 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 164 | |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 165 | void ThrowNoSuchMethodError(uint32_t method_idx) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 166 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 167 | |
| 168 | // NullPointerException |
| 169 | |
Mathieu Chartier | c785344 | 2015-03-27 14:35:38 -0700 | [diff] [blame] | 170 | void ThrowNullPointerExceptionForFieldAccess(ArtField* field, |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 171 | bool is_read) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 172 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 173 | |
Nicolas Geoffray | 0aa50ce | 2015-03-10 11:03:29 +0000 | [diff] [blame] | 174 | void ThrowNullPointerExceptionForMethodAccess(uint32_t method_idx, |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 175 | InvokeType type) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 176 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 177 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 178 | void ThrowNullPointerExceptionForMethodAccess(ArtMethod* method, |
Sebastien Hertz | 2d6ba51 | 2013-05-17 11:31:37 +0200 | [diff] [blame] | 179 | InvokeType type) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 180 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Sebastien Hertz | 2d6ba51 | 2013-05-17 11:31:37 +0200 | [diff] [blame] | 181 | |
Nicolas Geoffray | 0aa50ce | 2015-03-10 11:03:29 +0000 | [diff] [blame] | 182 | void ThrowNullPointerExceptionFromDexPC() |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 183 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 184 | |
Nicolas Geoffray | 0aa50ce | 2015-03-10 11:03:29 +0000 | [diff] [blame] | 185 | void ThrowNullPointerException(const char* msg) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 186 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 187 | |
| 188 | // RuntimeException |
| 189 | |
| 190 | void ThrowRuntimeException(const char* fmt, ...) |
| 191 | __attribute__((__format__(__printf__, 1, 2))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 192 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 193 | |
| 194 | // VerifyError |
| 195 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 196 | void ThrowVerifyError(mirror::Class* referrer, const char* fmt, ...) |
Ian Rogers | 62d6c77 | 2013-02-27 08:32:07 -0800 | [diff] [blame] | 197 | __attribute__((__format__(__printf__, 2, 3))) |
Mathieu Chartier | 9044347 | 2015-07-16 20:32:27 -0700 | [diff] [blame^] | 198 | SHARED_REQUIRES(Locks::mutator_lock_) COLD_ATTR; |
Ian Rogers | 87e552d | 2012-08-31 15:54:48 -0700 | [diff] [blame] | 199 | |
| 200 | } // namespace art |
| 201 | |
Brian Carlstrom | fc0e321 | 2013-07-17 14:40:12 -0700 | [diff] [blame] | 202 | #endif // ART_RUNTIME_COMMON_THROWS_H_ |