Orfeo Toolbox  3.16
itkFEMException.cxx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkFEMException.cxx,v $
5  Language: C++
6  Date: $Date: 2009-01-29 21:28:16 $
7  Version: $Revision: 1.7 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 // disable debug warnings in MS compiler
19 #ifdef _MSC_VER
20 #pragma warning(disable: 4786)
21 #endif
22 
23 #include "itkFEMException.h"
24 
25 namespace itk {
26 namespace fem {
27 
28 FEMException::FEMException(const char *file, unsigned int lineNumber, std::string location) :
29  ExceptionObject(file,lineNumber)
30 {
31  SetDescription("Unhandled exception in FEM class!");
32  SetLocation(location);
33 }
34 
35 FEMExceptionIO::FEMExceptionIO(const char *file, unsigned int lineNumber, std::string location, std::string moreDescription) :
36  FEMException(file,lineNumber)
37 {
38  SetDescription("IO error in FEM class: "+moreDescription);
39  SetLocation(location);
40 }
41 
42 FEMExceptionWrongClass::FEMExceptionWrongClass(const char *file, unsigned int lineNumber, std::string location)
43  : FEMException(file, lineNumber, location)
44 {
45  SetDescription("Object was of wrong class!");
46 }
47 
48 FEMExceptionObjectNotFound::FEMExceptionObjectNotFound(const char *file, unsigned int lineNumber, std::string location, std::string baseClassName, int GN)
49  : FEMException(file, lineNumber, location)
50 {
51  m_baseClassName=baseClassName;
52  m_GN=GN;
53  OStringStream buf;
54  buf<<"Object not found ("<<m_baseClassName<<", GN="<<m_GN<<")!";
55  SetDescription(buf.str().c_str());
56 }
57 
58 FEMExceptionSolution::FEMExceptionSolution(const char *file, unsigned int lineNumber, std::string location, std::string moreDescription) :
59  FEMException(file,lineNumber)
60 {
61  SetDescription("Error when solving FEM problem: "+moreDescription);
62  SetLocation(location);
63 }
64 
65 }} // end namespace itk::fem

Generated at Sat Feb 2 2013 23:36:43 for Orfeo Toolbox with doxygen 1.8.1.1