-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Exceptions into another file, add special Nan error
- Loading branch information
Showing
7 changed files
with
48 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef NDHIST_EXCEPTIONS | ||
#define NDHIST_EXCEPTIONS | ||
|
||
#include <stdexcept> | ||
#include <string> | ||
|
||
// exceptions | ||
class HistogramSaveError: public std::runtime_error { | ||
public: | ||
HistogramSaveError(const std::string&); | ||
}; | ||
|
||
class HistogramBinningError: public std::logic_error { | ||
public: | ||
HistogramBinningError(const std::string&); | ||
}; | ||
|
||
class HistogramNanError: public HistogramBinningError { | ||
public: | ||
HistogramNanError(const std::string&); | ||
}; | ||
|
||
#endif |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "Exceptions.hh" | ||
|
||
//______________________________________________________________________ | ||
// exception definitions | ||
|
||
HistogramSaveError::HistogramSaveError(const std::string& what): | ||
std::runtime_error(what) | ||
{} | ||
|
||
HistogramBinningError::HistogramBinningError(const std::string& what): | ||
std::logic_error(what) | ||
{} | ||
|
||
HistogramNanError::HistogramNanError(const std::string& what): | ||
HistogramBinningError(what) | ||
{} |
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