mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
catch all exceptions in all tutorials and examples
This commit is contained in:
parent
d69e463b30
commit
eec694729c
@ -45,6 +45,7 @@
|
|||||||
// ----------------- Main program -----------------
|
// ----------------- Main program -----------------
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
try
|
||||||
{
|
{
|
||||||
/// \page tutorial1
|
/// \page tutorial1
|
||||||
/// We set the number of blocks in each direction.
|
/// We set the number of blocks in each direction.
|
||||||
@ -102,6 +103,10 @@ int main()
|
|||||||
/// \internal [write vtk]
|
/// \internal [write vtk]
|
||||||
/// \endinternal
|
/// \endinternal
|
||||||
}
|
}
|
||||||
|
catch (const std::exception &e) {
|
||||||
|
std::cerr << "Program threw an exception: " << e.what() << "\n";
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
/// \page tutorial1
|
/// \page tutorial1
|
||||||
/// We read the vtu output file in \a Paraview and obtain the following grid.
|
/// We read the vtu output file in \a Paraview and obtain the following grid.
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
///
|
///
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
/// \page tutorial2
|
/// \page tutorial2
|
||||||
@ -195,6 +196,10 @@ int main()
|
|||||||
/// \internal [write output]
|
/// \internal [write output]
|
||||||
/// \endinternal
|
/// \endinternal
|
||||||
}
|
}
|
||||||
|
catch (const std::exception &e) {
|
||||||
|
std::cerr << "Program threw an exception: " << e.what() << "\n";
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
/// \page tutorial2
|
/// \page tutorial2
|
||||||
/// We read the vtu output file in \a Paraview and obtain the following pressure
|
/// We read the vtu output file in \a Paraview and obtain the following pressure
|
||||||
|
@ -93,6 +93,7 @@
|
|||||||
/// \snippet tutorial3.cpp main
|
/// \snippet tutorial3.cpp main
|
||||||
/// \internal [main]
|
/// \internal [main]
|
||||||
int main ()
|
int main ()
|
||||||
|
try
|
||||||
{
|
{
|
||||||
/// \internal [main]
|
/// \internal [main]
|
||||||
/// \endinternal
|
/// \endinternal
|
||||||
@ -316,6 +317,10 @@ int main ()
|
|||||||
Opm::writeVtkData(grid, dm, vtkfile);
|
Opm::writeVtkData(grid, dm, vtkfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (const std::exception &e) {
|
||||||
|
std::cerr << "Program threw an exception: " << e.what() << "\n";
|
||||||
|
throw;
|
||||||
|
}
|
||||||
/// \internal [write output]
|
/// \internal [write output]
|
||||||
/// \endinternal
|
/// \endinternal
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
/// \snippet tutorial4.cpp main
|
/// \snippet tutorial4.cpp main
|
||||||
/// \internal[main]
|
/// \internal[main]
|
||||||
int main ()
|
int main ()
|
||||||
|
try
|
||||||
{
|
{
|
||||||
/// \internal[main]
|
/// \internal[main]
|
||||||
/// \endinternal
|
/// \endinternal
|
||||||
@ -436,6 +437,11 @@ int main ()
|
|||||||
|
|
||||||
destroy_wells(wells);
|
destroy_wells(wells);
|
||||||
}
|
}
|
||||||
|
catch (const std::exception &e) {
|
||||||
|
std::cerr << "Program threw an exception: " << e.what() << "\n";
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
/// \internal[write output]
|
/// \internal[write output]
|
||||||
/// \endinternal
|
/// \endinternal
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user