catch(Exception ex) { }
What's the best way to proceed?
Rip them all out and let it crash? Add logging code? Message boxes? This is in C#.
6) _____ is used to find and fix bugs in the Java programs. Explanation: The Java Debugger (JDB or jdb) is a command-line java debugger that debugs the java class. It is a part of the Java Platform Debugger Architecture (JPDA) that helps in the inspections and debugging of a local or remote Java Virtual Machine (JVM).
What Does Bug Fix Mean? A bug fix is a change to a system or product designed to handle a programming bug/glitch. Many different types of programming bugs that create errors with system implementation may require specific bug fixes that are successfully resolved by a development or other IT team.
Code defects is a more formal term, and "defects per 1,000 non-comment lines of source code" is a relatively common way of quantifying the bugginess of the software. Well this isn't really useful because "code defect" is a noun and -as you point out- "buggy" is an adjective.
It partly depends on how aggressive you can be. Is this app internal or external? Will your changes be deployed on live systems soon? Do you have specific bugs to fix, or is it just deemed to be a disaster?
To reduce the bug count as quickly as possible, but with the most risk of serious damage, just remove all the catch blocks and let exceptions bubble up. For a much more delicate approach, just add logging to start with.
You should also talk to whoever wrote the app to start with, if possible. Try to find out why they've got so many exception-swallowing blocks. Do they really understand exceptions at all? A certain amount of tact is necessary here, I suspect :)
Next stop: unit tests...
Fix the bugs that you were set out to do, and report the exception swallowing blocks as new, critical, bugs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With