Hi,
Can someone give me a good example of throwing your own exception classes and catching a reference of them, ie:
try
{
functionx();
}
catch (MyException& ex)
{
printf(ex.GetMessage());
}
functionx()
{
// This isnt right!
MyException* pEx = new MyException();
pEx->SetMessage("Throwing a random message here..."
;
throw pEx;
}
Skute
"There are 10 types of people in this World, those that understand binary, and those that don't!"
Can someone give me a good example of throwing your own exception classes and catching a reference of them, ie:
try
{
functionx();
}
catch (MyException& ex)
{
printf(ex.GetMessage());
}
functionx()
{
// This isnt right!
MyException* pEx = new MyException();
pEx->SetMessage("Throwing a random message here..."
throw pEx;
}
Skute
"There are 10 types of people in this World, those that understand binary, and those that don't!"