This commit was manufactured by cvs2svn to create tag
[lyx.git] / src / error.C
blob22648ce9221e79a19f5cf645eabd782fb6a28990
1 #include <config.h>
3 #ifdef __GNUG__
4 #pragma implementation
5 #endif
7 #include "error.h"
8 #include <cstdio>
10 Error::Error(int level) // should loglevel also be an argument?
12         debuglevel = level;
13         loglevel = 0;
17 void Error::setDebugLevel(int level)
19         debuglevel = level;
23 void Error::debug(string const & msg, int level)
25         if (debuglevel & level)
26                 print(msg);
27         // should also print to the logfile
30 void Error::print(string const & msg)
32         if (!msg.empty()) 
33                 fprintf(stderr, "%s\n", msg.c_str());