X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaException.h;h=faae382cf0a06b7bf20ece8eb4050ec69c3b1b70;hb=08d413da4e6a2345cf06424418857a4f6715daf9;hp=81a2bd04c4303e603e48576924cc1c529d2a25be;hpb=596488a9529ffbedea2e6693e32e9b19f042b7e7;p=crea.git diff --git a/src/creaException.h b/src/creaException.h index 81a2bd0..faae382 100644 --- a/src/creaException.h +++ b/src/creaException.h @@ -3,8 +3,8 @@ Program: crea Module: $RCSfile: creaException.h,v $ Language: C++ - Date: $Date: 2008/09/26 14:09:55 $ - Version: $Revision: 1.1 $ + Date: $Date: 2009/06/04 14:24:07 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -35,11 +35,11 @@ #define __creaException_h__ #include "creaSystem.h" +#include "creaMessageManager.h" #include namespace crea { - inline std::string bbGetObjectDescription() { return(""); } class CREA_EXPORT Exception : public std::exception @@ -51,8 +51,17 @@ namespace crea : mObject(object), mSourceFile(source_file), mMessage(message) - {} + { + mWhatMessage = " * ERROR : " + mMessage + + " * OBJECT : " + mObject + + " * FILE " + mSourceFile; + } ~Exception() throw() {} + virtual const char* what() const throw() + { + return mWhatMessage.c_str(); + } + void Print() throw() { std::cerr << "* ERROR : " << mMessage <