exceptions.h
1 /* Copyright (c) 2013-2023, EPFL/Blue Brain Project
2  *
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 #include <stdexcept> // std::runtime_error
7 
8 namespace morphio {
9 
11 class MorphioError: public std::runtime_error
12 {
13  public:
14  explicit MorphioError(const std::string& _msg)
15  : std::runtime_error(_msg) {}
16 };
17 
19 {
20  public:
21  explicit NotImplementedError(const std::string& _msg)
22  : MorphioError(_msg) {}
23 };
24 
26 {
27  public:
28  explicit RawDataError(const std::string& _msg)
29  : MorphioError(_msg) {}
30 };
31 
33 {
34  public:
35  explicit UnknownFileType(const std::string& _msg)
36  : MorphioError(_msg) {}
37 };
38 
39 class SomaError: public MorphioError
40 {
41  public:
42  explicit SomaError(const std::string& _msg)
43  : MorphioError(_msg) {}
44 };
45 
47 {
48  public:
49  explicit IDSequenceError(const std::string& _msg)
50  : RawDataError(_msg) {}
51 };
52 
54 {
55  public:
56  explicit MultipleTrees(const std::string& _msg)
57  : RawDataError(_msg) {}
58 };
59 
61 {
62  public:
63  explicit MissingParentError(const std::string& _msg)
64  : RawDataError(_msg) {}
65 };
66 
68 {
69  public:
70  explicit SectionBuilderError(const std::string& _msg)
71  : RawDataError(_msg) {}
72 };
73 
75 {
76  public:
77  explicit WriterError(const std::string& _msg)
78  : MorphioError(_msg) {}
79 };
80 } // namespace morphio
morphio::MultipleTrees
Definition: exceptions.h:53
morphio::IDSequenceError
Definition: exceptions.h:46
morphio::SomaError
Definition: exceptions.h:39
morphio::MissingParentError
Definition: exceptions.h:60
morphio::WriterError
Definition: exceptions.h:74
morphio::MorphioError
Definition: exceptions.h:11
morphio::UnknownFileType
Definition: exceptions.h:32
morphio::RawDataError
Definition: exceptions.h:25
morphio::NotImplementedError
Definition: exceptions.h:18
morphio::SectionBuilderError
Definition: exceptions.h:67