-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip ci] Data for new modeler (4.1) : add custom exceptions + add on…
…e check in production code
- Loading branch information
1 parent
ce6d3d4
commit 5bca306
Showing
6 changed files
with
76 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/solver/modeler/dataSeries/dataSeriesRepoExceptions.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "antares/solver/modeler/dataSeries/dataSeriesRepoExceptions.h" | ||
|
||
#include <string> | ||
|
||
namespace Antares::Solver::Modeler::DataSeries | ||
{ | ||
DataSeriesRepo_Empty::DataSeriesRepo_Empty(): | ||
std::invalid_argument("Data series repo is empty, and somebody requests data from it") | ||
{ | ||
} | ||
|
||
DataSeriesRepo_DataSeriesNotExist::DataSeriesRepo_DataSeriesNotExist(const std::string setId): | ||
std::invalid_argument("Data series repo : data series '" + setId + "' does not exist") | ||
{ | ||
} | ||
|
||
DataSeriesRepo_DSalreadyExists::DataSeriesRepo_DSalreadyExists(const std::string setId): | ||
std::invalid_argument("Data series repo : data series '" + setId + "' already exists") | ||
{ | ||
} | ||
|
||
} // namespace Antares::Solver::Modeler::DataSeries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...r/modeler/dataSeries/include/antares/solver/modeler/dataSeries/dataSeriesRepoExceptions.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
#include <stdexcept> | ||
|
||
namespace Antares::Solver::Modeler::DataSeries | ||
{ | ||
class DataSeriesRepo_Empty: public std::invalid_argument | ||
{ | ||
public: | ||
DataSeriesRepo_Empty(); | ||
}; | ||
|
||
class DataSeriesRepo_DataSeriesNotExist: public std::invalid_argument | ||
{ | ||
public: | ||
DataSeriesRepo_DataSeriesNotExist(const std::string setId); | ||
}; | ||
|
||
class DataSeriesRepo_DSalreadyExists: public std::invalid_argument | ||
{ | ||
public: | ||
DataSeriesRepo_DSalreadyExists(const std::string setId); | ||
}; | ||
} // namespace Antares::Solver::Modeler::DataSeries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters