mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
8080775: Better argument formatting for assert() and friends
Reviewed-by: kbarrett, pliden
This commit is contained in:
parent
aa0818a98a
commit
1e71f67736
225 changed files with 1342 additions and 1432 deletions
|
@ -1027,10 +1027,10 @@ void os::WatcherThreadCrashProtection::check_crash_protection(int sig,
|
|||
}
|
||||
}
|
||||
|
||||
#define check_with_errno(check_type, cond, msg) \
|
||||
do { \
|
||||
int err = errno; \
|
||||
check_type(cond, err_msg("%s; error='%s' (errno=%d)", msg, strerror(err), err)); \
|
||||
#define check_with_errno(check_type, cond, msg) \
|
||||
do { \
|
||||
int err = errno; \
|
||||
check_type(cond, "%s; error='%s' (errno=%d)", msg, strerror(err), err); \
|
||||
} while (false)
|
||||
|
||||
#define assert_with_errno(cond, msg) check_with_errno(assert, cond, msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue