< prev index next >
src/hotspot/share/utilities/exceptions.hpp
Print this page
*** 235,249 ****
// The THROW... macros should be used to throw an exception. They require a THREAD variable to be
// visible within the scope containing the THROW. Usually this is achieved by declaring the function
// with a TRAPS argument.
! #ifdef THIS_FILE
! #define THREAD_AND_LOCATION THREAD, THIS_FILE, __LINE__
! #else
! #define THREAD_AND_LOCATION THREAD, __FILE__, __LINE__
! #endif
#define THROW_OOP(e) \
{ Exceptions::_throw_oop(THREAD_AND_LOCATION, e); return; }
#define THROW_HANDLE(e) \
--- 235,250 ----
// The THROW... macros should be used to throw an exception. They require a THREAD variable to be
// visible within the scope containing the THROW. Usually this is achieved by declaring the function
// with a TRAPS argument.
! // Extracts just the filename from a file path
! inline const char* _simple_basename(const char* s) {
! const char* result = strrchr(s, '/');
! return (result == NULL) ? s : (result + 1);
! }
! #define THREAD_AND_LOCATION THREAD, _simple_basename(__FILE__), __LINE__
#define THROW_OOP(e) \
{ Exceptions::_throw_oop(THREAD_AND_LOCATION, e); return; }
#define THROW_HANDLE(e) \
< prev index next >