PageRenderTime 53ms CodeModel.GetById 28ms 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
  1. using System;
  2. using throw_exceptionNamespace;
  3. public class runme
  4. {
  5. static void Main() {
  6. Foo f = new Foo();
  7. try {
  8. f.test_int();
  9. throw new Exception("Integer exception should have been thrown");
  10. } catch (System.Exception) {
  11. }
  12. try {
  13. f.test_msg();
  14. throw new Exception("String exception should have been thrown");
  15. } catch (System.Exception) {
  16. }
  17. try {
  18. f.test_cls();
  19. throw new Exception("Class exception should have been thrown");
  20. } catch (System.Exception) {
  21. }
  22. }
  23. }