Skip to content

Commit

Permalink
Refs #38. Caught an except for a non-existing direciton E33.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Oct 31, 2018
1 parent c1a7a03 commit 67c8c81
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pyrs/interface/strainstresscalwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,14 @@ def _set_peak_parameter_to_plot(self, param_name, ss_direction, is_raw_grid):
"""
# check inputs
checkdatatypes.check_string_variable('(Peak) parameter name', param_name)
checkdatatypes.check_string_variable('Strain/stress direction (e11/e22/e33)', ss_direction,
self._core.strain_stress_calculator.get_strain_stress_direction())
try:
checkdatatypes.check_string_variable('Strain/stress direction (e11/e22/e33)', ss_direction,
self._core.strain_stress_calculator.get_strain_stress_direction())
except ValueError as value_error:
gui_helper.pop_message(self, message='Unable to plot @ {}'.format(ss_direction),
detailed_message='{}'.format(value_error),
message_type='error')
return
checkdatatypes.check_bool_variable('Flag for raw experiment grid', is_raw_grid)

print ('[DB...ASAP] Try to plot {} @ direction {}'.format(param_name, ss_direction))
Expand Down

0 comments on commit 67c8c81

Please sign in to comment.