Fix compilation issue due to generic Exception