Does C++ have an equivalent to .NET's NotImplementedException?

Does the standard library of C++ contain an exception equivalent to .NET's NotImplementedException?

If not, what are the best practices to handle incomplete methods that I intend to complete later on?


Solution 1:

In the spirit of @dustyrockpyle, I inherit from std::logic_error but I use that class's string constructor, rather than overriding what()

class NotImplemented : public std::logic_error
{
public:
    NotImplemented() : std::logic_error("Function not yet implemented") { };
};

Solution 2:

You can inherit from std::logic_error, and define your error message that way:

class NotImplementedException : public std::logic_error
{
public:
    virtual char const * what() const { return "Function not yet implemented."; }
};

I think doing it this way makes catching the exception more explicit if that's actually a possibility. Reference to std::logic_error: http://www.cplusplus.com/reference/stdexcept/logic_error/