Add test case for inherited exceptions

Test case written by Dana Jansens.