We have production code that is not easily deployed in a test area. We also have a new library of code that we would like to “plug in” to the production code.
The production code would be making a few calls to the new code. Each of these calls are not mission critical (updating analytic information in a database).
If I surrounded all the calls to the new code with “try{…} catch(exception)” to avoid crashing the production code….
A) What are some problems I am exposing the new code to
B) How stinky is this.
c) what would you do.
0
A) You could be introducing new bugs when your new code throws exceptions and your usual production code doesn’t complete. And what are the secondary affects of your new code? For example, do they write new values to the database or change program flow or business rules? You could also introduce new performance issues.
B) Pretty stinky to put new code live to test it.
C) I would make sure the test systems are set up correctly, no matter how difficult, so the new code could be accurately and safely tested. It’s worth the investment.