libpniio
exceptions.hpp
Go to the documentation of this file.
1 //
2 // (c) Copyright 2014 DESY, Eugen Wintersberger <eugen.wintersberger@desy.de>
3 //
4 // This file is part of libpniio.
5 //
6 // libpniio is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // libpniio is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with libpniio. If not, see <http://www.gnu.org/licenses/>.
18 //************************************************************************
19 //
20 // Created on: Jul 7, 2014
21 // Author: Eugen Wintersberger <eugen.wintersberger@desy.de>
22 //
23 
24 #pragma once
25 
26 #include <iostream>
27 #include <pni/core/error.hpp>
28 
29 namespace pni{
30 namespace io{
31 
39  class io_error:public pni::core::exception
40  {
41  public:
42  //-----------------------------------------------------------------
44  explicit io_error();
45 
46  //-----------------------------------------------------------------
48  explicit io_error(const pni::core::exception_record &i,
49  const pni::core::string &d);
50 
51  //-----------------------------------------------------------------
53  ~io_error() throw();
54 
55  //-----------------------------------------------------------------
57  friend std::ostream &operator<<(std::ostream &o,
58  const io_error &e);
59  };
60 
61 
68  class link_error:public pni::core::exception
69  {
70  public:
71  //-----------------------------------------------------------------
73  explicit link_error();
74 
75  //-----------------------------------------------------------------
77  explicit link_error(const pni::core::exception_record &i,
78  const pni::core::string &d);
79 
80  //-----------------------------------------------------------------
82  ~link_error() throw();
83 
84  //-----------------------------------------------------------------
86  friend std::ostream &operator<<(std::ostream &o,
87  const link_error &e);
88  };
89 
90  //-------------------------------------------------------------------------
99  class parser_error:public pni::core::exception
100  {
101  public:
102  //-----------------------------------------------------------------
104  explicit parser_error();
105 
106  //-----------------------------------------------------------------
108  explicit parser_error(const pni::core::exception_record &i,
109  const pni::core::string &d);
110 
111  //-----------------------------------------------------------------
113  ~parser_error() throw();
114 
115  //-----------------------------------------------------------------
117  friend std::ostream &operator<<(std::ostream &o,
118  const parser_error &e);
119  };
120 
121  //-------------------------------------------------------------------------
130  class invalid_object_error:public pni::core::exception
131  {
132  public:
133  //-----------------------------------------------------------------
135  explicit invalid_object_error();
136 
137  //-----------------------------------------------------------------
139  explicit invalid_object_error(const pni::core::exception_record &i,
140  const pni::core::string &d);
141 
142  //-----------------------------------------------------------------
144  ~invalid_object_error() throw();
145 
146  //-----------------------------------------------------------------
148  friend std::ostream &operator<<(std::ostream &o,
149  const invalid_object_error &e);
150  };
151 
152  //-------------------------------------------------------------------------
160  class object_error:public pni::core::exception
161  {
162  public:
163  //-----------------------------------------------------------------
165  explicit object_error();
166 
167  //-----------------------------------------------------------------
169  explicit object_error(const pni::core::exception_record &i,
170  const pni::core::string &d);
171 
172  //-----------------------------------------------------------------
174  ~object_error() throw();
175 
176  //-----------------------------------------------------------------
178  friend std::ostream &operator<<(std::ostream &o,
179  const object_error &e);
180  };
181 
182 
183 //end of namespace
184 }
185 }
object_error()
default constructor
Definition: exceptions.cpp:101
~object_error()
destructor
Definition: exceptions.cpp:109
general parser related error
Definition: exceptions.hpp:99
unexpected invalid object
Definition: exceptions.hpp:130
~invalid_object_error()
destructor
Definition: exceptions.cpp:92
friend std::ostream & operator<<(std::ostream &o, const invalid_object_error &e)
output operator
Definition: exceptions.cpp:95
friend std::ostream & operator<<(std::ostream &o, const parser_error &e)
output operator
Definition: exceptions.cpp:76
Definition: cbf_reader.hpp:41
~io_error()
destructor
Definition: exceptions.cpp:39
~parser_error()
destructor
Definition: exceptions.cpp:73
parser_error()
default constructor
Definition: exceptions.cpp:65
invalid_object_error()
default constructor
Definition: exceptions.cpp:82
general error on IO objects
Definition: exceptions.hpp:160
general IO error
Definition: exceptions.hpp:39
friend std::ostream & operator<<(std::ostream &o, const object_error &e)
output operator
Definition: exceptions.cpp:112
friend std::ostream & operator<<(std::ostream &o, const io_error &e)
output operator
Definition: exceptions.cpp:42
io_error()
default constructor
Definition: exceptions.cpp:31