Huge refactor, pulling server and local out into their own binaries

This commit is contained in:
mdiluzio 2015-01-10 16:55:30 +00:00
parent 1b2010faba
commit 0ead12c7dd
16 changed files with 165 additions and 247 deletions

25
source/system/error.h Normal file
View file

@ -0,0 +1,25 @@
#ifndef _TTRTS_ERROR_H_
#define _TTRTS_ERROR_H_
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
//======================================================================================================================
// Error functions
// For local fatal errors
inline void fatal_error(const char *msg)
{
std::cerr<<msg<<std::endl;
exit(1);
}
// For system fatal errors (ie. functions that set errno)
inline void fatal_perror(const char *msg)
{
perror(msg);
exit(1);
}
#endif