wrap incorrect as_a() failures in a new exception