#include "ros/console.h"
#include "ros/static_assert.h"
#include <ros/platform.h>
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | ROS_ASSERT(cond) |
Asserts that the provided condition evaluates to true. More... | |
#define | ROS_ASSERT_CMD(cond, cmd) |
Runs a command if the provided condition is false. More... | |
#define | ROS_ASSERT_ENABLED |
#define | ROS_ASSERT_MSG(cond, ...) |
Asserts that the provided condition evaluates to true. More... | |
#define | ROS_BREAK() |
Aborts program execution. More... | |
#define | ROS_ISSUE_BREAK() abort(); |
Always issues a breakpoint instruction. More... | |
#define ROS_ASSERT | ( | cond | ) |
Asserts that the provided condition evaluates to true.
If it is false, program execution will abort, with an informative statement about which assertion failed, in what file. Use ROS_ASSERT instead of assert() itself.
If running inside a debugger, ROS_ASSERT will allow you to step past the assertion.
#define ROS_ASSERT_CMD | ( | cond, | |
cmd | |||
) |
#define ROS_ASSERT_MSG | ( | cond, | |
... | |||
) |
Asserts that the provided condition evaluates to true.
If it is false, program execution will abort, with an informative statement about which assertion failed, in what file, and it will print out a printf-style message you define. Example usage:
ROS_ASSERT_MSG(x > 0, "Uh oh, x went negative. Value = %d", x);
If running inside a debugger, ROS_ASSERT will allow you to step past the assertion.
#define ROS_BREAK | ( | ) |
Aborts program execution.
Aborts program execution with an informative message stating what file and line it was called from. Use ROS_BREAK instead of calling assert(0) or ROS_ASSERT(0).
If running inside a debugger, ROS_BREAK will allow you to step past the breakpoint.
#define ROS_ISSUE_BREAK | ( | ) | abort(); |