Skip to content

Commit

Permalink
Merge pull request #216 from grantfirl/unit_conversion_error_verbosity
Browse files Browse the repository at this point in the history
Unit conversion error verbosity
  • Loading branch information
climbfuji authored Aug 22, 2019
2 parents 6d7d43e + 63fe681 commit f8a69b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mkcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def convert_to(self, units):
try:
function = getattr(unit_conversion, function_name)
except AttributeError:
raise Exception('Error, automatic unit conversion from {0} to {1} not implemented'.format(self.units, units))
raise Exception('Error, automatic unit conversion from {0} to {1} for {2} in {3} not implemented'.format(self.units, units, self.standard_name, self.container))
conversion = function()
self._actions['out'] = function()

Expand All @@ -195,7 +195,7 @@ def convert_from(self, units):
try:
function = getattr(unit_conversion, function_name)
except AttributeError:
raise Exception('Error, automatic unit conversion from {1} to {0} not implemented'.format(self.units, units))
raise Exception('Error, automatic unit conversion from {1} to {0} for {2} in {3} not implemented'.format(self.units, units, self.standard_name, self.container))
conversion = function()
self._actions['in'] = function()

Expand Down

0 comments on commit f8a69b1

Please sign in to comment.