00001 #ifndef PROSPLIGN_EXCEPTION_HPP 00002 #define PROSPLIGN_EXCEPTION_HPP 00003 00004 /* 00005 * $Id: prosplign_exception.hpp 107470 2007-07-19 13:35:41Z chetvern $ 00006 * 00007 * ========================================================================= 00008 * 00009 * PUBLIC DOMAIN NOTICE 00010 * National Center for Biotechnology Information 00011 * 00012 * This software/database is a "United States Government Work" under the 00013 * terms of the United States Copyright Act. It was written as part of 00014 * the author's official duties as a United States Government employee and 00015 * thus cannot be copyrighted. This software/database is freely available 00016 * to the public for use. The National Library of Medicine and the U.S. 00017 * Government have not placed any restriction on its use or reproduction. 00018 * 00019 * Although all reasonable efforts have been taken to ensure the accuracy 00020 * and reliability of the software and data, the NLM and the U.S. 00021 * Government do not and cannt warrant the performance or results that 00022 * may be obtained by using this software or data. The NLM and the U.S. 00023 * Government disclaim all warranties, express or implied, including 00024 * warranties of performance, merchantability or fitness for any particular 00025 * purpose. 00026 * 00027 * Please cite the author in any work or product based on this material. 00028 * 00029 * ========================================================================= 00030 * 00031 * Author: Boris Kiryutin 00032 * 00033 * ========================================================================= 00034 * File Description: 00035 * prosplign library exceptions 00036 * 00037 */ 00038 00039 #include <corelib/ncbistl.hpp> 00040 #include <corelib/ncbiexpt.hpp> 00041 00042 BEGIN_NCBI_SCOPE 00043 00044 class CProSplignException : EXCEPTION_VIRTUAL_BASE public CException 00045 { 00046 public: 00047 enum EErrCode { 00048 eFileNotFound, 00049 eFormat, 00050 eOuputError, 00051 eAliData, 00052 eBackAli, 00053 eWrongScore, 00054 eParam, 00055 eNotEnoughMemory, 00056 eGenericError 00057 }; 00058 virtual const char* GetErrCodeString(void) const { 00059 switch ( GetErrCode() ) { 00060 case eFileNotFound: 00061 return "Can't open file"; 00062 case eFormat: 00063 return "Unexpected format"; 00064 case eOuputError: 00065 return "Error in output preparation code"; 00066 case eAliData: 00067 return "Internal alignment format error"; 00068 case eBackAli: 00069 return "Back alignment error"; 00070 case eWrongScore: 00071 return "Score check failed"; 00072 case eParam: 00073 return "Parameters for alignment are out of scope"; 00074 case eNotEnoughMemory: 00075 return "Not enough memory error"; 00076 case eGenericError: 00077 return "Generic error"; 00078 default: 00079 return CException::GetErrCodeString(); 00080 } 00081 } 00082 NCBI_EXCEPTION_DEFAULT(CProSplignException, CException); 00083 }; 00084 00085 END_NCBI_SCOPE 00086 00087 #endif /* PROSPLIGN_EXCEPTION_HPP */ 00088 00089
1.4.6
Modified on Wed Dec 09 08:17:25 2009 by modify_doxy.py rev. 173732