CiftiLib
A C++ library for CIFTI-2 and CIFTI-1 files
CiftiException.h
1 #ifndef __CIFTI_EXCEPTION_H__
2 #define __CIFTI_EXCEPTION_H__
3 
4 /*LICENSE_START*/
5 /*
6  * Copyright (c) 2014, Washington University School of Medicine
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without modification,
10  * are permitted provided that the following conditions are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  * this list of conditions and the following disclaimer in the documentation
17  * and/or other materials provided with the distribution.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 #include "AString.h"
32 
33 #include <stdexcept>
34 
35 namespace cifti {
36 
40  class CiftiException : public std::runtime_error {
41 
42 public:
44 
45  CiftiException(const AString& s);
46 
48 
50 
51  virtual ~CiftiException() throw();
52 
53  virtual AString whatString() const throw();
54 
55 private:
57  AString exceptionDescription;
58 };
59 
60 } // namespace
61 
62 #endif // __CIFTI_EXCEPTION_H__
Definition: CiftiException.h:40
CiftiException()
Definition: CiftiException.cxx:36
virtual ~CiftiException()
Definition: CiftiException.cxx:86
CiftiException & operator=(const CiftiException &e)
Definition: CiftiException.cxx:73
virtual AString whatString() const
Definition: CiftiException.cxx:95
namespace for all CiftiLib functionality
Definition: CiftiBrainModelsMap.h:42