Add assertion on exception raised