ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
Errors.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef ERRORS_H
32#define ERRORS_H
33
34//Definition of Error classes of all kind
35//Exceptions on input XML files
36
37#include <iostream>
38#include <sstream>
39#include <cassert>
40#include <vector>
41#include <cmath>
42#include <list>
43#include <string>
44#include <algorithm>
45
47enum TypeError { WARNING = 0, ERROR = 1 };
48
49// Macro allowing to use assert with error message
50# ifndef NDEBUG
51# define assertM(condition, message) \
52 do {\
53 if (!(condition)) { \
54 std::cerr << "---------------------------------------------------------" \
55 << std::endl << "Error assertion not verified" << std::endl << \
56 " file: " << __FILE__ << std::endl << \
57 " line: " << __LINE__ << std::endl << \
58 " assertion: `" #condition "` failed" << std::endl \
59 << " " << message << std::endl \
60 << "---------------------------------------------------------" << std::endl; \
61 std::exit(EXIT_FAILURE); \
62 } \
63 } while (false)
64#else
65# define ASSERT(condition, message) do { } while (false)
66#endif
67
68//***************************************************************************************
69//--------------------------Computing errors/warnings definition-------------------------
70//***************************************************************************************
71
72class Errors
73{
74public:
75 Errors();
76 Errors(const std::string& message, const char* sourceFile = "unknown", int lineNumber = -1);
77 virtual ~Errors();
78
79 static void errorMessage(const std::string& message);
80 static void errorMessage(const std::string& message, double value);
81 static void prepareErrorFiles(const std::string& folder);
82
83 void setError(const std::string& message, const char* sourceFile = "", int lineNumber = -1);
84 void setError(const std::string& message, const double value);
85 void displayError(const int& num);
86 void writeErrorInFile(const int& num, const std::string& folder, const int& ErrorType);
87
88 //Accessor
89 int getState();
90
91 static constexpr int defaultInt = 0;
92 static constexpr int defaultIntNeg = -1;
93 static constexpr double defaultDouble = 0.;
94 static const std::string defaultString;
95
96private:
97 std::string m_message;
99 std::string m_file;
101 double m_value;
102};
103
104extern std::vector<Errors> errors;
105extern std::vector<Errors> warnings; //FP//TODO// To improve by a specific class
106
107//***************************************************************************************
108//--------------------------------------EXCEPTIONS---------------------------------------
109//***************************************************************************************
110
111//Exception handling on error code ECOGEN
112//---------------------------------------
113class ErrorECOGEN : public std::exception
114{
115public:
116 //***************
117 ErrorECOGEN(std::string infoError = "", const char* sourceFile = "", int lineNumber = -1, int errorCode = 1):
118 std::exception(), m_errorCode(errorCode), m_lineNumber(lineNumber), m_sourceFile(sourceFile), m_infoError(infoError) {}
119 virtual ~ErrorECOGEN() throw() {}
120 //***************
121 virtual const char* what(void) const throw()
122 {
123 return "Exception ECOGEN: fix and restart run";
124 }
125 //***************
126 std::string infoError(void) const throw()
127 {
128 std::stringstream message;
129 message << "--------------------------------------------------" << std::endl;
130 message << this->what() << std::endl;
131 message << "****************************************" << std::endl;
132 if (m_sourceFile != "")
133 {
134 message << " infos on exception in code source :" << std::endl;
135 message << " file: '" << m_sourceFile << "'" << std::endl;
136 if (m_lineNumber != -1) message << " line: " << m_lineNumber << std::endl;
137 }
138 message << this->additionalInfo() << std::endl;
139 message << "--------------------------------------------------" << std::endl;
140 return message.str();
141 }
142 //***************
143 virtual std::string additionalInfo(void) const throw()
144 {
145 return m_infoError;
146 }
147 //***************
148 int getErrorCode() { return m_errorCode; }
149 //***************
150private:
153 std::string m_sourceFile;
154 std::string m_infoError;
155};
156
157//---------------------------------------------------------------
158
159//Exception handling on input files (XML, mesh)
160//---------------------------------------------
161
163{
164public:
165 //***************
166 ErrorInput(std::string fileInput = "", const char* sourceFile = "", int lineNumber = -1, int errorCode = 2) :
167 ErrorECOGEN(), m_errorCode(errorCode), m_lineNumber(lineNumber), m_sourceFile(sourceFile), m_fileInput(fileInput){}
168 virtual ~ErrorInput() throw(){}
169 //***************
170 virtual const char* what(void) const throw()
171 {
172 return "Exception during reading input file";
173 }
174 //***************
175 std::string infoError(void) const throw()
176 {
177 std::stringstream message;
178 message << "--------------------------------------------------" << std::endl;
179 message << this->what() << std::endl;
180 message << "****************************************" << std::endl;
181 if (m_fileInput != "") { message << " Input file concerned: '" << m_fileInput << "'" << std::endl; }
182 if (m_sourceFile != "")
183 {
184 message << " Infos on exception in source code:" << std::endl;
185 message << " file: '" << m_sourceFile << "'" << std::endl;
186 if (m_lineNumber != -1) message << " line: " << m_lineNumber << std::endl;
187 }
188 message << this->additionalInfo();
189 message << "--------------------------------------------------" << std::endl;
190 return message.str();
191 }
192 //***************
193 virtual std::string additionalInfo(void) const throw()
194 {
195 return "";
196 }
197 //***************
198 int lineNumber() const throw () { return m_lineNumber; }
199 //***************
200 std::string fileName() const throw () { return m_sourceFile; }
201 //***************
202 int getErrorCode() { return m_errorCode; }
203 //***************
204protected:
207 std::string m_sourceFile;
208 std::string m_fileInput;
209};
210
211//---------------------------------------------------------------
212
213//Exception handling on unstructured mesh file
214//--------------------------------------------
216{
217public:
218 //***************
219 ErrorMeshNS(std::string fileMesh = "", const char* sourceFile = "", int lineNumber = -1, int errorCode = 2) :
220 ErrorInput(fileMesh, sourceFile, lineNumber, errorCode) {}
221 virtual ~ErrorMeshNS() throw(){}
222 //***************
223 virtual const char* what(void) const throw()
224 {
225 return "Exception during reading unstructured mesh file: file not found or incorrect structure";
226 }
227 //***************
228 std::string infoError(void) const throw()
229 {
230 std::stringstream message;
231 message << "--------------------------------------------------" << std::endl;
232 message << this->what() << std::endl;
233 message << "****************************************" << std::endl;
234 if (m_fileInput != "") { message << " mesh file concerned: '" << m_fileInput << "'" << std::endl; }
235 if (m_sourceFile != "")
236 {
237 message << " infos on exception in code source :" << std::endl;
238 message << " file: '" << m_sourceFile << "'" << std::endl;
239 if (m_lineNumber != -1) message << " line: " << m_lineNumber << std::endl;
240 }
241 message << this->additionalInfo();
242 message << "--------------------------------------------------" << std::endl;
243 return message.str();
244 }
245};
246
247//---------------------------------------------------------------
248
249//Exception handling on input XML files
250//-------------------------------------
251
252class ErrorXML : public ErrorInput
253{
254public:
255 //***************
256 ErrorXML(std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1, int errorCode = 2) :
257 ErrorInput(fileXML, sourceFile, lineNumber, errorCode) {}
258 virtual ~ErrorXML() throw(){}
259 //***************
260 virtual const char* what(void) const throw()
261 {
262 return "Exception during reading XML file: file not found or incorrect structure";
263 }
264 //***************
265 std::string infoError(void) const throw()
266 {
267 std::stringstream message;
268 message << "--------------------------------------------------" << std::endl;
269 message << this->what() << std::endl;
270 message << "****************************************" << std::endl;
271 if (m_fileInput != "") { message << " XML file concerned: '" << m_fileInput << "'" << std::endl; }
272 if (m_sourceFile != "")
273 {
274 message << " infos on exception in code source :" << std::endl;
275 message << " file: '" << m_sourceFile << "'" << std::endl;
276 if (m_lineNumber != -1) message << " line: " << m_lineNumber << std::endl;
277 }
278 message << this->additionalInfo();
279 message << "--------------------------------------------------" << std::endl;
280 return message.str();
281 }
282};
283
284//---------------------------------------------------------------
285
287{
288public:
289 //***************
290 ErrorXMLMessage(std::string message = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
291 ErrorXML(fileXML, sourceFile, lineNumber), m_message(message){}
292 virtual ~ErrorXMLMessage() throw(){}
293 //***************
294 virtual const char* what(void) const throw()
295 {
296 return "Exception on XML file: input files are not compatible";
297 }
298 //***************
299 virtual std::string additionalInfo(void) const throw()
300 {
301 std::stringstream message;
302 message << " details: " << m_message << std::endl;
303 return message.str();
304 }
305 //***************
306 std::string message() const throw () { return m_message; }
307 //***************
308private:
309 std::string m_message;
310};
311
312//---------------------------------------------------------------
313
315{
316public:
317 //***************
318 ErrorXMLRacine(std::string root = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
319 ErrorXML(fileXML, sourceFile, lineNumber), m_root(root){}
320 virtual ~ErrorXMLRacine() throw(){}
321 //***************
322 virtual const char* what(void) const throw()
323 {
324 return "Exception on XML file: root not found";
325 }
326 //***************
327 virtual std::string additionalInfo(void) const throw()
328 {
329 std::stringstream message;
330 message << " root name searched: '" << m_root << "'" << std::endl;
331 return message.str();
332 }
333 //***************
334 std::string root() const throw () { return m_root; }
335 //***************
336private:
337 std::string m_root;
338};
339
340//---------------------------------------------------------------
341
343{
344public:
345 //***************
346 ErrorXMLElement(std::string element = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
347 ErrorXML(fileXML, sourceFile, lineNumber), m_element(element){}
348 virtual ~ErrorXMLElement() throw(){}
349 //***************
350 virtual const char* what(void) const throw()
351 {
352 return "Exception on XML file: element not found";
353 }
354 //***************
355 virtual std::string additionalInfo(void) const throw()
356 {
357 std::stringstream message;
358 message << " element name searched: '" << m_element << "'" << std::endl;
359 return message.str();
360 }
361 //***************
362 std::string element() const throw () { return m_element; }
363 //***************
364private:
365 std::string m_element;
366};
367
368//---------------------------------------------------------------
369
371{
372public:
373 //***************
374 ErrorXMLAttribut(std::string attribute = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
375 ErrorXML(fileXML, sourceFile, lineNumber), m_attribute(attribute){}
376 virtual ~ErrorXMLAttribut() throw(){}
377 //***************
378 virtual const char* what(void) const throw()
379 {
380 return "Exception on XML file: attribute not found";
381 }
382 //***************
383 virtual std::string additionalInfo(void) const throw()
384 {
385 std::stringstream message;
386 message << " attribute name searched: '" << m_attribute << "'" << std::endl;
387 return message.str();
388 }
389 //***************
390 std::string attribute() const throw () { return m_attribute; }
391 //***************
392private:
393 std::string m_attribute;
394};
395
396//---------------------------------------------------------------
397
398class ErrorXMLDev : public ErrorXML
399{
400public:
401 //***************
402 ErrorXMLDev(std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
403 ErrorXML(fileXML, sourceFile, lineNumber){}
404 virtual ~ErrorXMLDev() throw(){}
405 //***************
406 virtual const char* what(void) const throw()
407 {
408 return "Exception on XML file: this portion of code is under development";
409 }
410 //***************
411private:
412};
413
414//---------------------------------------------------------------
415
417{
418public:
419 //***************
420 ErrorXMLLimite(std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
421 ErrorXML(fileXML, sourceFile, lineNumber){}
422 virtual ~ErrorXMLLimite() throw(){}
423 //***************
424 virtual const char* what(void) const throw()
425 {
426 return "Exception on XML file: error in boundary conditions";
427 }
428 //***************
429private:
430};
431
432//---------------------------------------------------------------
433
435{
436public:
437 //***************
438 ErrorXMLTermeSource(std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
439 ErrorXML(fileXML, sourceFile, lineNumber){}
440 virtual ~ErrorXMLTermeSource() throw(){}
441 //***************
442 virtual const char* what(void) const throw()
443 {
444 return "Exception on XML file: error in source term selection";
445 }
446 //***************
447private:
448};
449
450//---------------------------------------------------------------
451
452class ErrorXMLEOS : public ErrorXML
453{
454public:
455 //***************
456 ErrorXMLEOS(std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
457 ErrorXML(fileXML, sourceFile, lineNumber){}
458 virtual ~ErrorXMLEOS() throw(){}
459 //***************
460 virtual const char* what(void) const throw()
461 {
462 return "Exception on XML file: error on equation of state";
463 }
464 //***************
465private:
466};
467
468//---------------------------------------------------------------
469
471{
472public:
473 //***************
474 ErrorXMLEOSUnknown(std::string typeEOS = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
475 ErrorXML(fileXML, sourceFile, lineNumber), m_typeEOS(typeEOS){}
476 virtual ~ErrorXMLEOSUnknown() throw(){}
477 //***************
478 virtual const char* what(void) const throw()
479 {
480 return "Exception on XML file: error on equation of state";
481 }
482 //***************
483 virtual std::string additionalInfo(void) const throw()
484 {
485 std::stringstream message;
486 message << " EOS type: '" << m_typeEOS << "' unknown" << std::endl;
487 return message.str();
488 }
489 //***************
490private:
491 std::string m_typeEOS;
492};
493
494//---------------------------------------------------------------
495
497{
498public:
499 //***************
500 ErrorXMLDomaineUnknown(std::string typeDomain = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
501 ErrorXML(fileXML, sourceFile, lineNumber), m_typeDomain(typeDomain){}
502 virtual ~ErrorXMLDomaineUnknown() throw(){}
503 //***************
504 virtual const char* what(void) const throw()
505 {
506 return "Exception on XML file: error on domain CI";
507 }
508 //***************
509 virtual std::string additionalInfo(void) const throw()
510 {
511 std::stringstream message;
512 message << " domain type: '" << m_typeDomain << "' unknown" << std::endl;
513 return message.str();
514 }
515 //***************
516private:
517 std::string m_typeDomain;
518};
519
520//---------------------------------------------------------------
521
523{
524public:
525 //***************
526 ErrorXMLBoundCondUnknown(std::string typeBoundCond = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
527 ErrorXML(fileXML, sourceFile, lineNumber), m_typeBoundCond(typeBoundCond) {}
528 virtual ~ErrorXMLBoundCondUnknown() throw() {}
529 //***************
530 virtual const char* what(void) const throw()
531 {
532 return "Exception on XML file: error in boundary condition CL";
533 }
534 //***************
535 virtual std::string additionalInfo(void) const throw()
536 {
537 std::stringstream message;
538 message << " boundary type: '" << m_typeBoundCond << "' unknown" << std::endl;
539 return message.str();
540 }
541 //***************
542private:
543 std::string m_typeBoundCond;
544};
545
546//---------------------------------------------------------------
547
548class ErrorXMLEtat : public ErrorXML
549{
550public:
551 //***************
552 ErrorXMLEtat(std::string nameEtat = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
553 ErrorXML(fileXML, sourceFile, lineNumber), m_nameEtat(nameEtat){}
554 virtual ~ErrorXMLEtat() throw(){}
555 //***************
556 virtual const char* what(void) const throw()
557 {
558 return "Exception on XML file: error in state";
559 }
560 //***************
561 virtual std::string additionalInfo(void) const throw()
562 {
563 std::stringstream message;
564 message << " state: '" << m_nameEtat << "' not found or incomplete" << std::endl;
565 return message.str();
566 }
567 //***************
568private:
569 std::string m_nameEtat;
570};
571
572//---------------------------------------------------------------
573
575{
576public:
577 //***************
578 ErrorXMLMaterialUnknown(std::string nameMateriau = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
579 ErrorXML(fileXML, sourceFile, lineNumber), m_nameMateriau(nameMateriau){}
580 virtual ~ErrorXMLMaterialUnknown() throw(){}
581 //***************
582 virtual const char* what(void) const throw()
583 {
584 return "Exception on XML file: error in state CI";
585 }
586 //***************
587 virtual std::string additionalInfo(void) const throw()
588 {
589 std::stringstream message;
590 message << " material type: '" << m_nameMateriau << "' unknown" << std::endl;
591 return message.str();
592 }
593 //***************
594private:
595 std::string m_nameMateriau;
596};
597
598//---------------------------------------------------------------
599
601{
602public:
603 //***************
604 ErrorXMLStretching(std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
605 ErrorXML(fileXML, sourceFile, lineNumber) {}
606 virtual ~ErrorXMLStretching() throw() {}
607 //***************
608 virtual const char* what(void) const throw()
609 {
610 return "Exception on XML file: error on stretching definition";
611 }
612 //***************
613private:
614 std::string m_nameMateriau;
615};
616
617//---------------------------------------------------------------
618
620{
621public:
622 //***************
623 ErrorXMLRelaxation(std::string nameRelaxation = "", std::string fileXML = "", const char* sourceFile = "", int lineNumber = -1) :
624 ErrorXML(fileXML, sourceFile, lineNumber), m_nameRelaxation(nameRelaxation){}
625 virtual ~ErrorXMLRelaxation() throw(){}
626 //***************
627 virtual const char* what(void) const throw()
628 {
629 return "Exception on XML file: error on relaxation";
630 }
631 //***************
632 virtual std::string additionalInfo(void) const throw()
633 {
634 std::stringstream message;
635 message << " relaxation type: '" << m_nameRelaxation << "' unknown or already added" << std::endl;
636 return message.str();
637 }
638 //***************
639private:
640 std::string m_nameRelaxation;
641};
642
643//---------------------------------------------------------------
644
645#endif // ERRORS_H
TypeError
Enumeration for the type of error (warning, error)
Definition Errors.h:47
@ ERROR
Definition Errors.h:47
@ WARNING
Definition Errors.h:47
std::vector< Errors > errors
Definition Errors.cpp:34
std::vector< Errors > warnings
Definition Errors.cpp:35
Definition Errors.h:114
std::string infoError(void) const
Definition Errors.h:126
std::string m_infoError
Definition Errors.h:154
virtual std::string additionalInfo(void) const
Definition Errors.h:143
int m_errorCode
Definition Errors.h:151
int getErrorCode()
Definition Errors.h:148
ErrorECOGEN(std::string infoError="", const char *sourceFile="", int lineNumber=-1, int errorCode=1)
Definition Errors.h:117
virtual ~ErrorECOGEN()
Definition Errors.h:119
int m_lineNumber
Definition Errors.h:152
virtual const char * what(void) const
Definition Errors.h:121
std::string m_sourceFile
Definition Errors.h:153
Definition Errors.h:163
ErrorInput(std::string fileInput="", const char *sourceFile="", int lineNumber=-1, int errorCode=2)
Definition Errors.h:166
virtual const char * what(void) const
Definition Errors.h:170
int getErrorCode()
Definition Errors.h:202
int m_errorCode
Definition Errors.h:205
std::string m_sourceFile
Definition Errors.h:207
std::string fileName() const
Definition Errors.h:200
int m_lineNumber
Definition Errors.h:206
virtual std::string additionalInfo(void) const
Definition Errors.h:193
std::string infoError(void) const
Definition Errors.h:175
virtual ~ErrorInput()
Definition Errors.h:168
std::string m_fileInput
Definition Errors.h:208
int lineNumber() const
Definition Errors.h:198
Definition Errors.h:216
virtual ~ErrorMeshNS()
Definition Errors.h:221
virtual const char * what(void) const
Definition Errors.h:223
std::string infoError(void) const
Definition Errors.h:228
ErrorMeshNS(std::string fileMesh="", const char *sourceFile="", int lineNumber=-1, int errorCode=2)
Definition Errors.h:219
Definition Errors.h:371
virtual ~ErrorXMLAttribut()
Definition Errors.h:376
ErrorXMLAttribut(std::string attribute="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:374
std::string attribute() const
Definition Errors.h:390
virtual std::string additionalInfo(void) const
Definition Errors.h:383
std::string m_attribute
Definition Errors.h:393
virtual const char * what(void) const
Definition Errors.h:378
Definition Errors.h:523
virtual ~ErrorXMLBoundCondUnknown()
Definition Errors.h:528
virtual std::string additionalInfo(void) const
Definition Errors.h:535
std::string m_typeBoundCond
Definition Errors.h:543
ErrorXMLBoundCondUnknown(std::string typeBoundCond="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:526
virtual const char * what(void) const
Definition Errors.h:530
Definition Errors.h:399
ErrorXMLDev(std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:402
virtual const char * what(void) const
Definition Errors.h:406
virtual ~ErrorXMLDev()
Definition Errors.h:404
Definition Errors.h:497
std::string m_typeDomain
Definition Errors.h:517
virtual const char * what(void) const
Definition Errors.h:504
ErrorXMLDomaineUnknown(std::string typeDomain="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:500
virtual ~ErrorXMLDomaineUnknown()
Definition Errors.h:502
virtual std::string additionalInfo(void) const
Definition Errors.h:509
Definition Errors.h:471
ErrorXMLEOSUnknown(std::string typeEOS="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:474
virtual ~ErrorXMLEOSUnknown()
Definition Errors.h:476
std::string m_typeEOS
Definition Errors.h:491
virtual std::string additionalInfo(void) const
Definition Errors.h:483
virtual const char * what(void) const
Definition Errors.h:478
Definition Errors.h:453
ErrorXMLEOS(std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:456
virtual ~ErrorXMLEOS()
Definition Errors.h:458
virtual const char * what(void) const
Definition Errors.h:460
Definition Errors.h:343
std::string m_element
Definition Errors.h:365
virtual const char * what(void) const
Definition Errors.h:350
virtual std::string additionalInfo(void) const
Definition Errors.h:355
std::string element() const
Definition Errors.h:362
virtual ~ErrorXMLElement()
Definition Errors.h:348
ErrorXMLElement(std::string element="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:346
Definition Errors.h:549
ErrorXMLEtat(std::string nameEtat="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:552
virtual ~ErrorXMLEtat()
Definition Errors.h:554
virtual std::string additionalInfo(void) const
Definition Errors.h:561
std::string m_nameEtat
Definition Errors.h:569
virtual const char * what(void) const
Definition Errors.h:556
Definition Errors.h:417
ErrorXMLLimite(std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:420
virtual const char * what(void) const
Definition Errors.h:424
virtual ~ErrorXMLLimite()
Definition Errors.h:422
Definition Errors.h:575
std::string m_nameMateriau
Definition Errors.h:595
virtual const char * what(void) const
Definition Errors.h:582
ErrorXMLMaterialUnknown(std::string nameMateriau="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:578
virtual ~ErrorXMLMaterialUnknown()
Definition Errors.h:580
virtual std::string additionalInfo(void) const
Definition Errors.h:587
Definition Errors.h:287
std::string m_message
Definition Errors.h:309
virtual const char * what(void) const
Definition Errors.h:294
virtual std::string additionalInfo(void) const
Definition Errors.h:299
std::string message() const
Definition Errors.h:306
ErrorXMLMessage(std::string message="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:290
virtual ~ErrorXMLMessage()
Definition Errors.h:292
Definition Errors.h:315
std::string root() const
Definition Errors.h:334
std::string m_root
Definition Errors.h:337
virtual const char * what(void) const
Definition Errors.h:322
ErrorXMLRacine(std::string root="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:318
virtual ~ErrorXMLRacine()
Definition Errors.h:320
virtual std::string additionalInfo(void) const
Definition Errors.h:327
Definition Errors.h:620
virtual const char * what(void) const
Definition Errors.h:627
ErrorXMLRelaxation(std::string nameRelaxation="", std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:623
std::string m_nameRelaxation
Definition Errors.h:640
virtual ~ErrorXMLRelaxation()
Definition Errors.h:625
virtual std::string additionalInfo(void) const
Definition Errors.h:632
Definition Errors.h:601
virtual const char * what(void) const
Definition Errors.h:608
virtual ~ErrorXMLStretching()
Definition Errors.h:606
std::string m_nameMateriau
Definition Errors.h:614
ErrorXMLStretching(std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:604
Definition Errors.h:435
ErrorXMLTermeSource(std::string fileXML="", const char *sourceFile="", int lineNumber=-1)
Definition Errors.h:438
virtual const char * what(void) const
Definition Errors.h:442
virtual ~ErrorXMLTermeSource()
Definition Errors.h:440
Definition Errors.h:253
virtual const char * what(void) const
Definition Errors.h:260
virtual ~ErrorXML()
Definition Errors.h:258
std::string infoError(void) const
Definition Errors.h:265
ErrorXML(std::string fileXML="", const char *sourceFile="", int lineNumber=-1, int errorCode=2)
Definition Errors.h:256
Definition Errors.h:73
static const std::string defaultString
Definition Errors.h:94
double m_value
Allows you to send an additionnal piece of information.
Definition Errors.h:101
void writeErrorInFile(const int &num, const std::string &folder, const int &ErrorType)
Definition Errors.cpp:142
static constexpr int defaultInt
Definition Errors.h:91
std::string m_message
Definition Errors.h:97
void displayError(const int &num)
Definition Errors.cpp:129
int m_line
Definition Errors.h:100
std::string m_file
Definition Errors.h:99
static void prepareErrorFiles(const std::string &folder)
Definition Errors.cpp:82
static void errorMessage(const std::string &message)
Definition Errors.cpp:56
static constexpr int defaultIntNeg
Definition Errors.h:92
Errors()
Definition Errors.cpp:39
void setError(const std::string &message, const char *sourceFile="", int lineNumber=-1)
Definition Errors.cpp:103
int m_state
Definition Errors.h:98
virtual ~Errors()
Definition Errors.cpp:52
int getState()
Definition Errors.cpp:122
static constexpr double defaultDouble
Definition Errors.h:93