SISCone  2.0.6
siscone_error.h
1 // -*- C++ -*-
3 // File: siscone_error.h //
4 // Description: header file for SISCone error messages (Csiscone_error) //
5 // This file is part of the SISCone project. //
6 // For more details, see http://projects.hepforge.org/siscone //
7 // //
8 // Copyright (c) 2006 Gavin Salam and Gregory Soyez //
9 // //
10 // This program is free software; you can redistribute it and/or modify //
11 // it under the terms of the GNU General Public License as published by //
12 // the Free Software Foundation; either version 2 of the License, or //
13 // (at your option) any later version. //
14 // //
15 // This program is distributed in the hope that it will be useful, //
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
18 // GNU General Public License for more details. //
19 // //
20 // You should have received a copy of the GNU General Public License //
21 // along with this program; if not, write to the Free Software //
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA //
23 // //
24 // $Revision:: 327 $//
25 // $Date:: 2011-11-25 15:19:39 +0100 (Fri, 25 Nov 2011) $//
27 
28 #ifndef __SISCONE_ERROR_H__
29 #define __SISCONE_ERROR_H__
30 
31 #include<iostream>
32 #include<string>
33 
34 namespace siscone{
35 
39 public:
42 
45  Csiscone_error(const std::string & message_in) {
46  m_message = message_in;
47  if (m_print_errors) std::cerr << "siscone::Csiscone_error: "<< message_in << std::endl;
48  };
49 
51  std::string message() const {return m_message;};
52 
55  static void setm_print_errors(bool print_errors) {
56  m_print_errors = print_errors;};
57 
58 private:
59  std::string m_message;
60  static bool m_print_errors;
61 };
62 
63 }
64 #endif
Csiscone_error(const std::string &message_in)
ctor with a given error message
Definition: siscone_error.h:45
class corresponding to errors that will be thrown by siscone
Definition: siscone_error.h:38
Definition: area.cpp:33
Csiscone_error()
default ctor
Definition: siscone_error.h:41
std::string message() const
access to the error message
Definition: siscone_error.h:51
static void setm_print_errors(bool print_errors)
switch on/off the error message printing
Definition: siscone_error.h:55
The SISCone project has been developed by Gavin Salam and Gregory Soyez
Documentation generated on Sun Sep 20 2015 01:33:13 for SISCone by  Doxygen 1.8.9.1