Get inherited class

Pages: 12
I don't like using exceptions. I read an article about pro's and con's ( http://www.codeproject.com/Articles/38449/C-Exceptions-Pros-and-Cons ).
Last edited on
Don't forget to remove that period '.' when you open the link, otherwise 404.
Sorry, changed it.
That article basically just says that it's hard to turn a project that wasn't exception safe to begin with into an exception safe one. That's more of an argument against bad planning than against exceptions.
4. Conclusion

There is no simple answer to the "exceptions or error codes" question. The decision needs to be made based on a specific situation that a development team faces. Some rough guidelines may be:

If you have a good development process and code standards that are actually being followed, if you are writing modern-style C++ code that relies on RAII to clean up resources for you, if your code base is modular, using exceptions may be a good idea.

If you are working with code that was not written with exception safety in mind, if you feel there is a lack of discipline in your development team, or if you are developing hard real-time systems, you should probably not use exceptions.
Topic archived. No new replies allowed.
Pages: 12