ShogunException.cpp
Go to the documentation of this file.00001 #include "lib/ShogunException.h"
00002 #include "lib/Signal.h"
00003
00004 #include <string.h>
00005 #include <stdio.h>
00006 #include <stdlib.h>
00007
00008 ShogunException::ShogunException(const char* str)
00009 {
00010 #ifndef WIN32
00011 CSignal::unset_handler();
00012 #endif
00013 val = new char[4096];
00014 if (val)
00015 strncpy(val,str,4096);
00016 else
00017 {
00018 fprintf(stderr, "Could not even allocate memory for exception - dying.\n");
00019 exit(1);
00020 }
00021 }