Original Post
In c++ can you right exception throwing functions (in classes) that force users of the class to us try catch clauses, like in Java.
Its just that I throw an exception from my main engine class if there is an error initialising the specific renderer (depending on API) but i can still instantiate the engine by doing this
CHooge* m_pEngine = new CHoogeEngine();
instead of this
try
{
CHoogeEngine* m_pEngine = new CHoogeEngine();
}
catch(CHoogeEngine e)
{
//stugg
}
Thanks
P.S.
Whats the best way to catch thrown exceptions that are classes. By value or by reference??