This question already has an answer here:

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.

marked as duplicate by user40980, unholysampler, Telastyn, Corbin March, EL Yusubov Aug 28 '13 at 17:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.