Tasks #1228

Add a macro for assertion + log message

Added by J. Moringen over 11 years ago. Updated over 11 years ago.

Status:ResolvedStart date:11/06/2012
Priority:NormalDue 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

Revision 49a3250f
Added by J. Wienke over 11 years ago

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.

Also available in: Atom PDF