Advertisement

Using Exceptions

Started by June 12, 2017 04:01 PM
11 comments, last by Khatharr 7 years, 5 months ago

I like this talk on exception handling from one of my college teacher : 

 

I don't always catch, but when I do it's because I set up something like:


throw std::runtime_error("class::func() - Failed to load the thing");

and then I catch-all in main() and print out the message.

You could do the same with logging and probably get more information. I only really care when it's things like not finding a file where it's expected.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

This topic is closed to new replies.

Advertisement