Skip to content

Commit

Permalink
[Examples] Use CanteraError in ic_engine.py
Browse files Browse the repository at this point in the history
Related to #569, swap catching bare Exception for the
more specific CanteraError
  • Loading branch information
CyberDrudge authored and bryanwweber committed Feb 1, 2019
1 parent 4b3bb8f commit 05eaa0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interfaces/cython/cantera/examples/reactors/ic_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def piston_speed(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
Expand Down

0 comments on commit 05eaa0a

Please sign in to comment.