Skip to content

Commit

Permalink
Make mpas_xarray error message more helpful
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Dec 5, 2016
1 parent 73b05bf commit 8a4a26e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mpas_analysis/shared/mpas_xarray/mpas_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def get_datetimes(time_var, yearoffset): # {{{
datetimes = [start + x for x in
pd.to_timedelta(time_var.values, unit='ns')]
else:
raise TypeError("time_var of unsupported type")
raise TypeError("time_var of unsupported type {}".format(
time_var.dtype))

return datetimes # }}}

Expand Down

0 comments on commit 8a4a26e

Please sign in to comment.