PCMException.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "../include/PCMException.h"
00030
00031 namespace ParCompMark
00032 {
00033
00034
00035
00036
00037
00038 Exception *Exception::mLastException = 0;
00039
00040
00041
00042
00043
00044 std::string Exception::translateType(const Exception::ExceptionType & type)
00045 {
00046
00047 switch (type)
00048 {
00049 case INTERNAL_ERROR:
00050 return std::string("Unknown internal error");
00051 break;
00052 case NULL_POINTER_ERROR:return std::string("Nullpointer error");
00053 break;
00054 case INVALID_NAME_ERROR:return std::string("Invalid name error");
00055 break;
00056 case INVALID_ENUM_ERROR:return std::string("Invalid enumerated value error");
00057 break;
00058 case INVALID_VALUE_ERROR:return std::string("Invalid value error");
00059 break;
00060 case INVALID_OBJECT_ERROR:return std::string("Invalid object error");
00061 break;
00062 case INVALID_CLASS_ERROR:return std::string("Invalid class error (not proper derived class)");
00063 break;
00064 case INVALID_OPERATION_ERROR:return std::string("Invalid operation error");
00065 break;
00066 case OPERATION_NOT_SUPPORTED_ERROR:return std::string("Operation is not supported on this platform");
00067 break;
00068 case OUT_OF_MEMORY_ERROR:return std::string("Out of memory error");
00069 break;
00070 case FILE_IO_ERROR:return std::string("File I/O error");
00071 break;
00072 case FILE_FORMAT_ERROR:return std::string("Invalid file format error");
00073 break;
00074 case USER_BREAK_ERROR:return std::string("The user stopped the application");
00075 break;
00076 case SCRIPT_ERROR:return std::string("Error in a script file.");
00077 break;
00078 case XLIB_ERROR:return std::string("Xlib error.");
00079 break;
00080 }
00081
00082 return std::string("Unknown exception");
00083
00084 }
00085
00086
00087
00088 }