-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace C++ exit(1) statements with exception handling (#329)
* throw runtime_error, rm exit(1) in featuretype&calcfeatures * rename type->input_type * throw EfelAssertionError to avoid exit(-1) * add test to trigger C++->Python AssertionError * remove featurename.find(";") check * typo in docstring * add feature's name to the error message * Revert "remove featurename.find(";") check" This reverts commit 954613a.
- Loading branch information
Showing
7 changed files
with
70 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef EFEL_EXCEPTIONS_H | ||
#define EFEL_EXCEPTIONS_H | ||
|
||
#include <stdexcept> | ||
|
||
// Define the custom exception class | ||
class EfelAssertionError : public std::runtime_error { | ||
public: | ||
explicit EfelAssertionError(const std::string& message) : std::runtime_error(message) {} | ||
}; | ||
|
||
#endif // EFEL_EXCEPTIONS_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
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