Agreed, e.g. using 3rd party controls where one is at the mercy of
what ever is given is the only circumstance that comes to my mind. is
there any other circumstance that one would want to do nothing about
the exception and fix the cause rather than ignore the symptom?

Kind Regards

Arjang

On 1 June 2010 10:48, Grant Maw <grant....@gmail.com> wrote:
> Your example is a "catch all" which is bad practice.
>
> The example in the MS article catches a specific exception. This is not the
> same thing. There can be circumstances where you want to catch a specific
> exception and do nothing about it.
>
> On 1 June 2010 10:38, Arjang Assadi <arjang.ass...@gmail.com> wrote:
>>
>> I thought only the beginner programmers or programmers without any
>> pride in their work or self discipline would write code like this:
>>
>> try
>> {
>>  //some code goes here
>> }
>> catch
>> {
>>  //No code here just business as usual, do nothing about the exceptions!
>> }
>>
>> but maybe I am wrong, this http://support.microsoft.com/kb/319465 was
>> unexpected!
>> in the code in the above link are there any reasons for
>> 1)Checking the type, or more generally first checking that at least
>> the minimum requirements of an operations will be satisfied before
>> using a sledge hammer?
>>
>> 2)Using some other (better) code e.g. reflection etc. would be
>> definitely more preferable to ignoring excpetion?
>>
>> 3)Any other suggestions?
>>
>> Regards
>>
>> Arjang
>
>

Reply via email to