If I am understanding the issue correctly, you can catch any specific
exceptions that are thrown. i.e. System.Argument Exception,
System.Argument OutOfRangeExcep tion. For any given method you call, the
documentation often lists possible exceptions that could be thrown. If you
do not get a specific exception, you will need to handle System.Exceptio n.
Once you catch an exception it often makes sense to create and throw your
own custom exception that wraps the original exception.
Scott Caskey
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"STeve" <sc***@symcor.c om> wrote in message
news:53******** *************** **@posting.goog le.com...
Hi guys,
In my active directory class I was wondering how I would be able to
catch invalid UserID's entered by the user. For example say if the
user entered in a UserID as a. (well any set of characters followed by
a period), an error gets thrown:
A device attached to the system is not functioning... etc
I was wondering if there is a way to catch this error (instead of just
catching Exception ex) so I could output an invalid UserID message to
the official creating the users.
Thanks in advance,
Steve