PageRenderTime 16ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-26/SWIG/Examples/test-suite/csharp/throw_exception_runme.cs

#
C# | 24 lines | 23 code | 1 blank | 0 comment | 0 complexity | 4d04fce1c009b49d4b8fff66b7d28f77 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1using System;
 2using throw_exceptionNamespace;
 3
 4public class runme
 5{
 6    static void Main() {
 7        Foo f = new Foo();
 8        try {
 9            f.test_int();
10            throw new Exception("Integer exception should have been thrown");
11        } catch (System.Exception) {
12        }
13        try {
14            f.test_msg();
15            throw new Exception("String exception should have been thrown");
16        } catch (System.Exception) {
17        }
18        try {
19            f.test_cls();
20            throw new Exception("Class exception should have been thrown");
21        } catch (System.Exception) {
22        }
23    }
24}