RTXI  2.4
The Real-Time eXperiment Interface Documentation
debug.cpp
Go to the documentation of this file.
1 /*
2  The Real-Time eXperiment Interface (RTXI)
3  Copyright (C) 2011 Georgia Institute of Technology, University of Utah, Weill Cornell Medical College
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 */
19 
20 #include <debug.h>
21 
22 void PRINT_BACKTRACE(void)
23 {
24  std::cerr << boost::stacktrace::stacktrace();
25 }
26 
27 void ERROR_MSG(const std::string& errmsg, ...){
28  va_list args;
29  va_start(args, errmsg);
30  char buf[256] = "";
31  vsprintf(buf, errmsg.c_str(), args);
32  std::cerr << std::string(buf, 256) << "\n";
33 }
34 
35 
ERROR_MSG
void ERROR_MSG(const std::string &errmsg,...)
Definition: debug.cpp:27
PRINT_BACKTRACE
void PRINT_BACKTRACE(void)
Prints a backtrace to standard error.
Definition: debug.cpp:22
debug.h