[Examples] Use CanteraError in ic_engine.py

Related to #569, swap catching bare Exception for the
more specific CanteraError
This commit is contained in:
CyberDrudge 2019-01-11 00:27:27 +05:30 committed by Bryan W. Weber
parent 4b3bb8f8fc
commit 05eaa0a5e4
No known key found for this signature in database
GPG key ID: 3A93E209C87E1FE7

View file

@ -146,7 +146,7 @@ for n1, t_i in enumerate(t):
raise 'Error: Refinement limit reached'
try:
sim.advance(t_i)
except Exception:
except ct.CanteraError:
sim.set_max_time_step(1e-6 * 10. ** -n2)
n_last_refinement = n1
# coarsen time step if too long ago