Add test for chained exception