Antares Simulator
Power System Simulator
LoadingError.hpp
1 /*
2  * Copyright 2007-2025, RTE (https://www.rte-france.com)
3  * See AUTHORS.txt
4  * SPDX-License-Identifier: MPL-2.0
5  * This file is part of Antares-Simulator,
6  * Adequacy and Performance assessment for interconnected energy networks.
7  *
8  * Antares_Simulator is free software: you can redistribute it and/or modify
9  * it under the terms of the Mozilla Public Licence 2.0 as published by
10  * the Mozilla Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * Antares_Simulator is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * Mozilla Public Licence 2.0 for more details.
17  *
18  * You should have received a copy of the Mozilla Public Licence 2.0
19  * along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20  */
21 
22 #pragma once
23 
24 #include <map>
25 #include <stdexcept>
26 
27 namespace Antares::Error
28 {
29 class LoadingError: public std::runtime_error
30 {
31 public:
32  using std::runtime_error::runtime_error;
33 };
34 
36 {
37 public:
38  explicit StudyFolderDoesNotExist(const std::string& folder);
39 };
40 
42 {
43 public:
44  explicit StudyFolderContainsNonASCIIchars(const std::string& folder);
45 };
46 
47 class NoAreas final: public LoadingError
48 {
49 public:
50  NoAreas();
51 };
52 
53 class Duplicates final: public LoadingError
54 {
55 public:
56  Duplicates();
57  Duplicates(const std::string& message);
58 };
59 
60 class InvalidFileName final: public LoadingError
61 {
62 public:
64 };
65 
67 {
68 public:
70 };
71 
72 class WritingPID final: public LoadingError
73 {
74 public:
75  explicit WritingPID(const std::string& filePath);
76 };
77 
79 {
80 public:
82 };
83 
85 {
86 public:
88 };
89 
91 {
92 public:
94 };
95 
97 {
98 public:
100 };
101 
103 {
104 public:
106 };
107 
109 {
110 public:
112 };
113 
115 {
116 public:
118 };
119 
120 class InvalidSolver final: public LoadingError
121 {
122 public:
123  explicit InvalidSolver(const std::string& solver, const std::string& availableSolverList);
124 };
125 
127 {
128 public:
129  explicit InvalidSolverSpecificParameters(const std::string& solver,
130  const std::string& specificParameters);
131 };
132 
134 {
135 public:
137 };
138 
139 class InvalidStudy final: public LoadingError
140 {
141 public:
142  explicit InvalidStudy(const std::string& study);
143 };
144 
145 class NoStudyProvided final: public LoadingError
146 {
147 public:
148  NoStudyProvided();
149 };
150 
151 class InvalidVersion final: public LoadingError
152 {
153 public:
154  InvalidVersion(const std::string& version, const std::string& latest);
155 };
156 
158 {
159 public:
160  explicit CommandLineArguments(unsigned int errors);
161 };
162 
164 {
165 public:
166  explicit IncompatibleOutputOptions(const std::string& text);
167 };
168 
170 {
171 public:
173 };
174 
176 {
177 public:
179 };
180 
181 } // namespace Antares::Error
Definition: LoadingError.hpp:158
Definition: LoadingError.hpp:54
Definition: LoadingError.hpp:170
Definition: LoadingError.hpp:176
Definition: LoadingError.hpp:85
Definition: LoadingError.hpp:103
Definition: LoadingError.hpp:164
Definition: LoadingError.hpp:79
Definition: LoadingError.hpp:61
Definition: LoadingError.hpp:109
Definition: LoadingError.hpp:115
Definition: LoadingError.hpp:127
Definition: LoadingError.hpp:121
Definition: LoadingError.hpp:140
Definition: LoadingError.hpp:152
Definition: LoadingError.hpp:30
Definition: LoadingError.hpp:48
Definition: LoadingError.hpp:146
Definition: LoadingError.hpp:67
Definition: LoadingError.hpp:36
Definition: LoadingError.hpp:91
Definition: LoadingError.hpp:73