mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-07-30 14:17:55 -05:00
Add exception handlers to all tutorials and examples
This commit is contained in:
@@ -109,6 +109,7 @@ fluxFunc(const std::vector<ADB>& m)
|
||||
|
||||
|
||||
int main()
|
||||
try
|
||||
{
|
||||
typedef AutoDiff::ForwardBlock<double> ADB;
|
||||
typedef ADB::V V;
|
||||
@@ -296,3 +297,8 @@ int main()
|
||||
<< "function s1 = solution\n"
|
||||
<< "s1 = [\n" << sw1 << "\n];\n";
|
||||
}
|
||||
catch (const std::exception &e) {
|
||||
std::cerr << "Program threw an exception: " << e.what() << "\n";
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user