Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "lib/ShogunException.h"
00012 #include "lib/Signal.h"
00013
00014 #include <string.h>
00015 #include <stdio.h>
00016 #include <stdlib.h>
00017
00018 using namespace shogun;
00019
00020 ShogunException::ShogunException(const char* str)
00021 {
00022 #ifndef WIN32
00023 CSignal::unset_handler();
00024 #endif
00025 val = (char*) malloc(sizeof(char)*4096);
00026 if (val)
00027 strncpy(val,str,4096);
00028 else
00029 {
00030 fprintf(stderr, "Could not even allocate memory for exception - dying.\n");
00031 exit(1);
00032 }
00033 }
00034
00035 ShogunException::~ShogunException()
00036 {
00037 }