I'm just finishing off a program in Visual C++ 6, and I want to submit the application. It needs to be crash-free. I don't want it to crash because of a hardware exception or any program bugs. So, I thought I would place code inside a try/catch(...) block, so that it would catch all exceptions instead of crashing.
But then after googling around in the web, I noticed that using try/catch(...) with the default options in Visual C++ 6 is highly frowned upon by advanced programmers, because it hides programming bugs.
Why isn't there a simple and recommended way to do this?
Visual C++, how to write robust code, why is the try/catch messed up?
Try/Catch itself isn't frowned upon. "Error hiding" (overriding root error messages with your own) is a terror for support engineers.
Try/Catch is extremely useful and will definitely help keep your program crash-free. In fact, as a software engineer who still uses VC++ 6.0, it is part of my companies coding standards to use try/catch when making a back-end call so that an unhandled exception doesn't crash the program.
Use try/catch, just be sure to write appropriate code in the catch statement.
Reply:from what i have noticed no one here is actually good enough at programing to answer any difficult questions, no one answered mine yet, and i doubt anyone is going to anytime soon
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment