Beispiel #1
0
 public void ExceptionTest(bool throwException)
 {
     try
     {
         InternalExceptionTest(throwException);
         Test_try_catch_struct03.Eval(!throwException);
     }
     catch
     {
         Test_try_catch_struct03.Eval(throwException);
     }
 }
Beispiel #2
0
    public void InternalExceptionTest(bool throwException)
    {
        string ExceptionClass = typeof(GenException <T>).ToString();

        try
        {
            if (throwException)
            {
                throw new GenException <T>();
            }
            if (throwException)
            {
                Test_try_catch_struct03.Eval(false);
            }
        }
        catch (GenException <System.InvalidCastException> )
        {
            //this should never bee hit!
            Test_try_catch_struct03.Eval(false);
        }
    }