mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add exception handlers to all tutorials and examples
This commit is contained in:
@@ -92,6 +92,7 @@ public:
|
||||
|
||||
|
||||
int main()
|
||||
try
|
||||
{
|
||||
int iter = 0;
|
||||
const double atol = 1.0e-13;
|
||||
@@ -102,3 +103,8 @@ int main()
|
||||
<< " using " << iter << " iterations." << '\n';
|
||||
std::cout << " f(x) = " << Func()(soln) << '\n';
|
||||
}
|
||||
catch (const std::exception &e) {
|
||||
std::cerr << "Program threw an exception: " << e.what() << "\n";
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user