00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 1999-2009 Soeren Sonnenburg 00008 * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society 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 ShogunException::ShogunException(const char* str) 00019 { 00020 #ifndef WIN32 00021 CSignal::unset_handler(); 00022 #endif 00023 val = (char*) malloc(sizeof(char)*4096); 00024 if (val) 00025 strncpy(val,str,4096); 00026 else 00027 { 00028 fprintf(stderr, "Could not even allocate memory for exception - dying.\n"); 00029 exit(1); 00030 } 00031 } 00032 00033 ShogunException::~ShogunException() 00034 { 00035 }