include/algo/align/nw/align_exception.hpp

Go to the documentation of this file.
00001 #ifndef ALGO_ALIGN_EXCEPTION__HPP
00002 #define ALGO_ALIGN_EXCEPTION__HPP
00003 
00004 /* $Id: align_exception.hpp 110510 2007-09-12 19:34:39Z kapustin $
00005 * ===========================================================================
00006 *
00007 *                            public DOMAIN NOTICE                          
00008 *               National Center for Biotechnology Information
00009 *                                                                          
00010 *  This software/database is a "United States Government Work" under the   
00011 *  terms of the United States Copyright Act.  It was written as part of    
00012 *  the author's official duties as a United States Government employee and 
00013 *  thus cannot be copyrighted.  This software/database is freely available 
00014 *  to the public for use. The National Library of Medicine and the U.S.    
00015 *  Government have not placed any restriction on its use or reproduction.  
00016 *                                                                          
00017 *  Although all reasonable efforts have been taken to ensure the accuracy  
00018 *  and reliability of the software and data, the NLM and the U.S.          
00019 *  Government do not and cannot warrant the performance or results that    
00020 *  may be obtained by using this software or data. The NLM and the U.S.    
00021 *  Government disclaim all warranties, express or implied, including       
00022 *  warranties of performance, merchantability or fitness for any particular
00023 *  purpose.                                                                
00024 *                                                                          
00025 *  Please cite the author in any work or product based on this material.   
00026 *
00027 * ===========================================================================
00028 *
00029 * Author:  Yuri Kapustin, Andrei Gourianov
00030 *
00031 * File Description:
00032 *   Algo library exceptions
00033 *
00034 */
00035 
00036 #include <corelib/ncbiexpt.hpp>
00037 
00038 
00039 /** @addtogroup AlgoAlignExcep
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  /* ALGO_ALIGN_EXCEPTION__HPP */
00111 
00112 

Generated on Sun Dec 6 21:55:28 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:20:32 2009 by modify_doxy.py rev. 173732