C++ best error handling practice?

Alessa Baker
Sun, 02 Dec 2018 00:51:04 +0000
C++

So I’ve been learning C++ the last few months, and given that I have certain values that are specified by designers exposed on a given class, I need to validate and ensure that these values aren’t nullptrs.

Right now, the way I’m handling it is a large if statement - I’m trying to effectively log to the user which of these classes are unset. Is there a better way to handle/do this?

I’d really appreciate any help here!

3 posts - 1 participant