Skip to content

Commit

Permalink
Move not_implemented_exception code to gridpp.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
tnipen committed Mar 11, 2024
1 parent 54dcc7c commit 5d89bb3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/gridpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ namespace gridpp {
class not_implemented_exception: public std::logic_error
{
public:
not_implemented_exception() : std::logic_error("Function not yet implemented") { };
not_implemented_exception();
};

/** Covariance structure function */
Expand Down
3 changes: 3 additions & 0 deletions src/api/gridpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ void gridpp::set_debug_level(int level) {
int gridpp::get_debug_level() {
return gridpp::_debug_level;
}
gridpp::not_implemented_exception::not_implemented_exception() :
std::logic_error("Function not yet implemented") {
};
2 changes: 1 addition & 1 deletion tests/test_swig.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_zero_size_dimension(self):
self.assertEqual(0, gridpp.test_vec3_input(np.zeros([3, 0, 0])))

def test_not_implemented_exception(self):
with self.assertRaises(Exception) as e:
with self.assertRaises(RuntimeError) as e:
gridpp.test_not_implemented_exception()


Expand Down

0 comments on commit 5d89bb3

Please sign in to comment.