#include "YACSBasesExport.hxx"
#include "Exception.hxx"
#include <iostream>
#include <sstream>
Go to the source code of this file.
|
#define | DEBTRACE(msg) |
|
#define | YACSTRACE(level, msg) {if(YACS::traceLevel >=level)std::cerr<<__FILE__<<" ["<<__LINE__<<"] : "<<msg<<std::endl;} |
| YACSTRACE macro for dynamic trace: print only if YACS_TRACELEVEL environment variable is set and level is less than its value. More...
|
|
#define | YASSERT(val) {if(!(val)){std::stringstream mess; mess<<__FILE__<<" ["<<__LINE__<<"] : assertion "<<#val<<" failed"; throw YACS::Exception(mess.str());}} |
| YASSERT macro is always defined, used like assert, but throw a YACS::Exception instead of abort. More...
|
|
◆ DEBTRACE
◆ YACSTRACE
#define YACSTRACE |
( |
|
level, |
|
|
|
msg |
|
) |
| {if(YACS::traceLevel >=level)std::cerr<<__FILE__<<" ["<<__LINE__<<"] : "<<msg<<std::endl;} |
YACSTRACE macro for dynamic trace: print only if YACS_TRACELEVEL environment variable is set and level is less than its value.
Definition at line 40 of file YacsTrace.hxx.
◆ YASSERT
#define YASSERT |
( |
|
val | ) |
{if(!(val)){std::stringstream mess; mess<<__FILE__<<" ["<<__LINE__<<"] : assertion "<<#val<<" failed"; throw YACS::Exception(mess.str());}} |
◆ AttachDebugger()
Definition at line 36 of file YacsTrace.cxx.
38 if(getenv (
"YACSDEBUGGER"))
40 std::stringstream exec;
41 exec <<
"$YACSDEBUGGER " << getpid() <<
"&";
42 std::cerr << exec.str() << std::endl;
43 system(exec.str().c_str());
Referenced by YACS::ENGINE::RefCounter::~RefCounter().