Mercurial > hg > truffle
comparison src/share/vm/utilities/exceptions.hpp @ 4840:0a10d80352d5
Merge
author | brutisso |
---|---|
date | Fri, 27 Jan 2012 09:04:57 +0100 |
parents | 20334ed5ed3c |
children | d2a62e0f25eb |
comparison
equal
deleted
inserted
replaced
4839:b4ebad3520bb | 4840:0a10d80352d5 |
---|---|
187 #define CHECK_0 CHECK_(0) | 187 #define CHECK_0 CHECK_(0) |
188 #define CHECK_NH CHECK_(Handle()) | 188 #define CHECK_NH CHECK_(Handle()) |
189 #define CHECK_NULL CHECK_(NULL) | 189 #define CHECK_NULL CHECK_(NULL) |
190 #define CHECK_false CHECK_(false) | 190 #define CHECK_false CHECK_(false) |
191 | 191 |
192 #define CHECK_AND_CLEAR THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; return; } (0 | |
193 #define CHECK_AND_CLEAR_(result) THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; return result; } (0 | |
194 #define CHECK_AND_CLEAR_0 CHECK_AND_CLEAR_(0) | |
195 #define CHECK_AND_CLEAR_NH CHECK_AND_CLEAR_(Handle()) | |
196 #define CHECK_AND_CLEAR_NULL CHECK_AND_CLEAR_(NULL) | |
197 #define CHECK_AND_CLEAR_false CHECK_AND_CLEAR_(false) | |
198 | |
192 // The THROW... macros should be used to throw an exception. They require a THREAD variable to be | 199 // The THROW... macros should be used to throw an exception. They require a THREAD variable to be |
193 // visible within the scope containing the THROW. Usually this is achieved by declaring the function | 200 // visible within the scope containing the THROW. Usually this is achieved by declaring the function |
194 // with a TRAPS argument. | 201 // with a TRAPS argument. |
195 | 202 |
196 #define THREAD_AND_LOCATION THREAD, __FILE__, __LINE__ | 203 #define THREAD_AND_LOCATION THREAD, __FILE__, __LINE__ |
256 CLEAR_PENDING_EXCEPTION; \ | 263 CLEAR_PENDING_EXCEPTION; \ |
257 ex->print(); \ | 264 ex->print(); \ |
258 ShouldNotReachHere(); \ | 265 ShouldNotReachHere(); \ |
259 } (0 | 266 } (0 |
260 | 267 |
261 | |
262 // ExceptionMark is a stack-allocated helper class for local exception handling. | 268 // ExceptionMark is a stack-allocated helper class for local exception handling. |
263 // It is used with the EXCEPTION_MARK macro. | 269 // It is used with the EXCEPTION_MARK macro. |
264 | 270 |
265 class ExceptionMark { | 271 class ExceptionMark { |
266 private: | 272 private: |