Tasks #1228
Add a macro for assertion + log message
Status: | Resolved | Start date: | 11/06/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | Logging | |||
Target version: | Robotics Service Bus - rsb-0.9 |
Description
The following is a common idiom:
assert(CONDITION);
if (!CONDITION) {
RSCERROR(logger, "CONDITION violated; this should not happen");
}
We could provide a preprocessor macro for doing the whole thing more compactly.
Associated revisions
Provide macros for the logging system which only log, if a boolean conditions is false.
This provides assertion-like logging.
fixes #1228
Merge branch 'task-1228'
History
#1 Updated by J. Wienke over 11 years ago
- Status changed from New to In Progress
- Target version set to rsb-0.9
#2 Updated by J. Wienke over 11 years ago
Jan, what do you think about the solution proposed in the respective feature branch?
#3 Updated by J. Wienke over 11 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset rsc|commit:49a3250fa4223735daaa466cf8b9b7db338481fe.