src/core/abort.h File Reference

#include "fatal-error.h"
#include <iostream>
Include dependency graph for abort.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NS_ABORT_MSG(msg)
#define NS_ABORT_IF(cond)
#define NS_ABORT_MSG_IF(cond, msg)
#define NS_ABORT_UNLESS(cond)   NS_ABORT_IF(!(cond))
#define NS_ABORT_MSG_UNLESS(cond, msg)   NS_ABORT_MSG_IF(!(cond),msg)

Define Documentation

#define NS_ABORT_IF ( cond   ) 
Value:
do {                                \
    if (cond)                           \
      {                             \
    std::cerr << "file=" << __FILE__ <<         \
      ", line=" << __LINE__ << ", abort on=\""#cond <<  \
            "\"" << std::endl;                                  \
    int *a = 0;                     \
    *a = 0;                         \
      }                             \
  } while (false)

Definition at line 34 of file abort.h.

#define NS_ABORT_MSG ( msg   ) 
Value:
do {                                \
    std::cerr << "file=" << __FILE__ <<                         \
      ", line=" << __LINE__ << ", abort, msg=\"" <<             \
      msg << "\"" << std::endl;                                 \
    int *a = 0;                                                 \
    *a = 0;                         \
  } while (false)

Definition at line 24 of file abort.h.

#define NS_ABORT_MSG_IF ( cond,
msg   ) 
Value:
do {                                \
    if (cond)                           \
      {                             \
    std::cerr << "file=" << __FILE__ <<         \
      ", line=" << __LINE__ << ", abort on=\""#cond <<  \
      "\", msg=\"" << msg << "\"" << std::endl;     \
    int *a = 0;                     \
    *a = 0;                         \
      }                             \
  } while (false)

Definition at line 46 of file abort.h.

Referenced by ns3::GlobalRouter::BuildNetworkLSAs(), ns3::GlobalRouter::DiscoverLSAs(), ns3::PcapWriter::Open(), ns3::GlobalRouter::ProcessBridgedBroadcastLink(), ns3::GlobalRouter::ProcessPointToPointLink(), and ns3::GlobalRouter::ProcessSingleBroadcastLink().

#define NS_ABORT_MSG_UNLESS ( cond,
msg   )     NS_ABORT_MSG_IF(!(cond),msg)
#define NS_ABORT_UNLESS ( cond   )     NS_ABORT_IF(!(cond))

Definition at line 58 of file abort.h.

Generated on Thu Dec 3 14:06:14 2009 for NS-3 by  doxygen 1.6.3