Cool, I have no idea I'm that funny.
Now back to business:
#1/2:
Yes, you should catch all exceptions and process exceptions you could
anticipate.
In C almost all API's returns error codes to notify you of failure,
exceptions are used to perform the same task in C#/VB.Net.
As you would process error codes in C, you should process exceptions in
C#/VB.Net.
For example, if you're using SMTP code, it's pretty easy to figure out
there might be some network related exceptions.
You might not know exactly why it's failing (may be all Cisco routers gone
mad), but you can figure out what to do if something failed.
And yes, you're ultimately responsible for all exceptions (unless there's a
bug in our/3rd party code and exception is thrown in error).
You're getting an exception because you did something and that operation
can not be performed properly.
You got an exception resolving name with DNS? Perhaps, network is down. Or
DNS server is down.
Or TCP/IP configuration on device is incorrect. Or server name entered by
user is incorrect.
Is it DNS class problem? Not at all, it's up to you to process and fix it.
And yes, you could do much better than "something bad happened while
resolving a DSN".
You can try backup server. You can verify if network is up. You can verify
if you can reach DNS server.
And you sure can suggest corrective action.
Now, how would you know which exception to expect? Easy, it's all in the
documentation.
For example, let's take a look at Dns.GetHostByName() documentation:
...
Exceptions
Exception Type Condition
ArgumentNullException hostName is a null reference (Nothing in Visual
Basic).
SocketException An error is encountered when resolving hostName.
SecurityException The caller does not have permission to access DNS
information.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aha, here's the list of exceptions you can expect and thus have to process.
Yes, it's not your code and you have no sources, but you know what to
expect from it.
#3.
You're developer; this is why System.SR seems to be good enough to you.
Too bad, it's useless to your customers.
#4
I do see your point. I'm sorry it's not redistributable.
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: Boris Nienke <
[email protected]>
Subject: Re: how to let user instll: System_SR_de.cab
User-Agent: 40tude_Dialog/2.0.12.1de
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <
[email protected]>
<
[email protected]>