AlmaBTE  1.3
A solver of the space- and time-dependent Boltzmann transport equation for phonons
exceptions.hpp
Go to the documentation of this file.
1 // Copyright 2015-2018 The ALMA Project Developers
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 // implied. See the License for the specific language governing
13 // permissions and limitations under the License.
14 
15 #pragma once
16 
19 
20 #include <string>
21 #include <stdexcept>
22 
23 namespace alma {
25 class exception : public std::runtime_error {
26 public:
28  exception(const std::string& message) : std::runtime_error(message) {
29  }
30 };
31 
33 class value_error : public exception {
34 public:
36  value_error(const std::string& message) : exception(message) {
37  }
38 };
39 
41 class input_error : public exception {
42 public:
44  input_error(const std::string& message) : exception(message) {
45  }
46 };
47 
49 class geometry_error : public exception {
50 public:
52  geometry_error(const std::string& message) : exception(message) {
53  }
54 };
55 } // namespace alma
Definition: analytic1d.hpp:26
Exception related to the contents of an input file.
Definition: exceptions.hpp:41
input_error(const std::string &message)
Basic constructor.
Definition: exceptions.hpp:44
Exception related to the parameters passed to a function.
Definition: exceptions.hpp:33
STL namespace.
Exception related to an inconsistent geometric result.
Definition: exceptions.hpp:49
Base class for all exceptions in ALMA.
Definition: exceptions.hpp:25
geometry_error(const std::string &message)
Basic constructor.
Definition: exceptions.hpp:52
exception(const std::string &message)
Basic constructor.
Definition: exceptions.hpp:28
value_error(const std::string &message)
Basic constructor.
Definition: exceptions.hpp:36