Huge refactor, pulling server and local out into their own binaries
This commit is contained in:
parent
1b2010faba
commit
0ead12c7dd
16 changed files with 165 additions and 247 deletions
25
source/system/error.h
Normal file
25
source/system/error.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue