Hi all
We are testing different type of exception to create our
handling policy
and we run into the following problem.
While testing we want to throw different types of
exceptions, but would
like to have these types stored in the web.config, to avoid
compiling on
each test.
The code should look somehow like this:
Dim myType As Object
myType =
ConfigurationSettings.AppSettings("TestException"
;).GetType
Dim temp As System.Type
temp = myType.GetType()
Dim exc As New Exception("Testing " &
mytype.ToString)
exc = CType(exc, temp)
Throw exc
With the only problem that this line exc = CType(exc, temp)
complains
that temp is not defined.
Is there any workaround?
Thanks in advance,
Lizet
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|