00001 #ifndef ALGO_ALIGN_EXCEPTION__HPP
00002 #define ALGO_ALIGN_EXCEPTION__HPP
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
00030
00031
00032
00033
00034
00035
00036 #include <corelib/ncbiexpt.hpp>
00037
00038
00039
00040
00041
00042
00043
00044
00045 BEGIN_NCBI_SCOPE
00046
00047
00048 class CAlgoAlignException : public CException
00049 {
00050 public:
00051 enum EErrCode {
00052 eInternal = 100,
00053 eBadParameter,
00054 eInvalidMatrix,
00055 eMemoryLimit,
00056 eInvalidCharacter,
00057 eIncorrectSequenceOrder,
00058 eInvalidSpliceTypeIndex,
00059 eIntronTooLong,
00060 eNoSeqData,
00061 ePattern,
00062 eNoHits,
00063 eNoAlignment,
00064 eNotInitialized,
00065 eFormat
00066 };
00067 virtual const char* GetErrCodeString(void) const {
00068 switch ( GetErrCode() ) {
00069 case eInternal:
00070 return "Internal error";
00071 case eBadParameter:
00072 return "One or more parameters passed are invalid";
00073 case eInvalidMatrix:
00074 return "Invalid score matrix";
00075 case eMemoryLimit:
00076 return "Memory limit exceeded";
00077 case eInvalidCharacter:
00078 return "Sequence contains one or more invalid characters";
00079 case eIncorrectSequenceOrder:
00080 return "mRna should go first";
00081 case eInvalidSpliceTypeIndex:
00082 return "Splice type index out of range";
00083 case eIntronTooLong:
00084 return "Max supported intron length exceeded";
00085 case eNoSeqData:
00086 return "No sequence data available";
00087 case ePattern:
00088 return "Problem with the hit pattern";
00089 case eNoHits:
00090 return "Zero hit count";
00091 case eNoAlignment:
00092 return "No alignment found";
00093 case eNotInitialized:
00094 return "Object not properly initialized";
00095 case eFormat:
00096 return "Unexpected format";
00097 default:
00098 return CException::GetErrCodeString();
00099 }
00100 }
00101 NCBI_EXCEPTION_DEFAULT(CAlgoAlignException, CException);
00102 };
00103
00104
00105 END_NCBI_SCOPE
00106
00107
00108
00109
00110 #endif
00111
00112