static_warning.cpp
Go to the documentation of this file.
1 #include "static_warning.hpp"
2 
3 #include "TextOutput.hpp"
4 
5 #include <iostream>
6 #include <csignal>
7 
8 namespace iv
9 {
10 
11 void startup_warning( SrcInfo info, const char * message )
12 {
13  iv::TextOutput << info.file << ":" << info.line << ": startup_warning: " << message << std::endl;
14 
15  // break / abort
16  #ifndef NDEBUG
17  //raise( SIGTRAP );
18  raise( SIGABRT );
19  #endif
20 }
21 
22 void runtime_warning( SrcInfo info, const char * message )
23 {
24  iv::TextOutput << info.file << ":" << info.line << ": runtime_warning: " << message << std::endl;
25 
26  // break / abort
27  #ifndef NDEBUG
28  //raise( SIGTRAP );
29  raise( SIGABRT );
30  #endif
31 }
32 
33 }