Create user exception derived from std::exception?
How a user exception class is created from standard exception?

Addressing below cases
Say i have a class with some enum that indicates type of object 

so based on type, member functions are available.Calling member function that is not available should throw an exception.Similarly when a getter of uninitialized is called again a exception should be thrown(I am using default argument to check for the uninitialized object).
Create user exception derived from std::exception?
===

How a user exception class is created from standard exception?

Addressing below cases
Say i have a class with some enum that indicates type of object 

so based on type, member functions are available.Calling member function that is not available should throw an exception.Similarly when a getter of uninitialized is called again a exception should be thrown(I am using default argument to check for the uninitialized object).