Commit ecf26a3f authored by GILLES Sebastien's avatar GILLES Sebastien

#1479 Use private inheritance for GracefulExit (we don't want it trapped by...

#1479 Use private inheritance for GracefulExit (we don't want it trapped by the catch over other exceptions).
parent 6745ad30
......@@ -19,7 +19,7 @@ namespace MoReFEM::ExceptionNS
GracefulExit::GracefulExit(const char* invoking_file, int invoking_line)
: MoReFEM::Exception("The code will stop now and return EXIT_SUCCESS", invoking_file, invoking_line)
: MoReFEM::Exception("The code will stop now and return EXIT_SUCCESS.", invoking_file, invoking_line)
{ }
......
......@@ -24,8 +24,13 @@ namespace MoReFEM::ExceptionNS
//! Exception when we want to exit gracefull with a EXIT_SUCCESS return code.
class GracefulExit : public MoReFEM::Exception
class GracefulExit : private MoReFEM::Exception
{
public:
//! Alias to parent.
using parent = MoReFEM::Exception;
public:
/*!
......@@ -50,6 +55,9 @@ namespace MoReFEM::ExceptionNS
//! Destructor
virtual ~GracefulExit() override;
//! Making what() accessible publicly.
using parent::what;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment