Skip to content

Commit

Permalink
Using dedicated errors
Browse files Browse the repository at this point in the history
  • Loading branch information
onesuper committed Jul 15, 2019
1 parent 689a977 commit 39658a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandasticsearch/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def _get_cols(self, mapping):
cols = self._get_mappings(mapping, index)

if len(cols) == 0:
raise Exception('0 columns found in mapping')
raise DataFrameException('0 columns found in mapping')
return cols

@classmethod
Expand All @@ -531,4 +531,4 @@ def _get_mappings(self, json_map, index_name):
if self._doc_type is not None:
return DataFrame.resolve_mappings(json_map[index_name]["mappings"][self._doc_type]["properties"])
else:
raise Exception('Please specify mapping for ES version under 7')
raise DataFrameException('Please specify mapping for ES version under 7')

0 comments on commit 39658a3

Please sign in to comment.