src/tool/error.cpp File Reference

#include "../include/base.h"
#include <iostream>
#include <signal.h>
#include "../tool/i18n.h"
#include <sys/types.h>
#include <unistd.h>

Include dependency graph for error.cpp:

Go to the source code of this file.

Functions

void WakeUpDebugger ()
void MissedAssertion (const char *filename, unsigned long line, const char *message)
void TriggerError (const char *filename, unsigned long line, const std::string &txt)


Function Documentation

void MissedAssertion ( const char *  filename,
unsigned long  line,
const char *  message 
)

Definition at line 45 of file error.cpp.

00047 {
00048   std::cout << std::endl;
00049   std::cerr << filename << ':' << line 
00050             << ": Missed assertion \"" << message << "\"."
00051             << std::endl;
00052 #if defined DEBUG
00053   WakeUpDebugger();
00054   abort();
00055 #endif
00056 }

Here is the call graph for this function:

void TriggerError ( const char *  filename,
unsigned long  line,
const std::string &  txt 
)

Definition at line 77 of file error.cpp.

00079 {
00080   std::cout << "! " 
00081             << Format(_("Error in %s:%lu"), filename, line)
00082             << ": " << txt << std::endl;
00083 
00084   assert(false);
00085   throw CError (filename, line, txt);
00086 }

Here is the call graph for this function:

void WakeUpDebugger (  ) 

Definition at line 32 of file error.cpp.

00033 {
00034 
00035 #ifdef LOVE_HAYPO_HACKS
00036   // Generate SIGTRAP
00037   asm ("int $0x03");
00038 #endif
00039     
00040 #if !defined WIN32
00041   kill (getpid(), SIGABRT);
00042 #endif
00043 }

Here is the caller graph for this function:


Generated on Mon Jan 1 13:24:59 2007 for Wormux by  doxygen 1.4.7