1 // ***************************************************************************
2 // BamException_p.h (c) 2011 Derek Barnett
3 // Marth Lab, Department of Biology, Boston College
4 // ---------------------------------------------------------------------------
5 // Last modified: 6 October 2011 (DB)
6 // ---------------------------------------------------------------------------
7 // Provides a basic exception class for BamTools internals
8 // ***************************************************************************
10 #ifndef BAMEXCEPTION_P_H
11 #define BAMEXCEPTION_P_H
17 // This file is not part of the BamTools API. It exists purely as an
18 // implementation detail. This header file may change from version to version
19 // without notice, or even be removed.
29 class BamException : public std::exception {
32 inline BamException(const std::string& where, const std::string& message)
34 , m_errorString(where + SEPARATOR + message)
37 inline ~BamException(void) throw() { }
39 inline const char* what(void) const throw() {
40 return m_errorString.c_str();
44 std::string m_errorString;
45 static const std::string SEPARATOR;
48 } // namespace Internal
49 } // namespace BamTools
51 #endif // BAMEXCEPTION_P_H