Another of my interesting phrases (or at least I don't know if someboddy used this phrase). What is silent catch? Silent catch is a term I use for try .. catch block, where the catch does nothing or at least you don't see it to be doing anything. The first example: try { some unsafe code here ... } catch {} Another example: try { some unsafe code here ... } catch (Exception ex) { hide something (for example grid or some other control) ... return; } The second example is as bad as the first. It will be underlined by the Microsoft Visual Studio code editor to warn you that the ex object isn't used anywhere within the body of the catch statement. Today I spent about two hours to investigate why a page doesn't display |
So:
"Try to avoid silent catch statements as they may cost you a lot of efforts to find the problem later (even if you wrote the code on your own)."