Add std::bad_cast to std_except.i

This exception occurs when dynamic_cast<T&> fails.

Fixes #783.
This commit is contained in:
Daniel Vollmer 2016-09-17 10:26:54 +02:00
commit 2dc87d7485
9 changed files with 12 additions and 0 deletions

View file

@ -7,6 +7,7 @@ public class li_std_except_runme {
public static void Main() {
Test test = new Test();
try { test.throw_bad_cast(); throw new Exception("throw_bad_cast failed"); } catch (InvalidCastException) {}
try { test.throw_bad_exception(); throw new Exception("throw_bad_exception failed"); } catch (ApplicationException) {}
try { test.throw_domain_error(); throw new Exception("throw_domain_error failed"); } catch (ApplicationException) {}
try { test.throw_exception(); throw new Exception("throw_exception failed"); } catch (ApplicationException) {}