Add explanatory message to an exception in DataTable

This commit is contained in:
Darren Burns
2023-02-02 15:41:24 +00:00
parent 62fb9d58bd
commit 18aaeaa284

View File

@@ -693,7 +693,7 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True):
The key of the cell currently occupying this coordinate. The key of the cell currently occupying this coordinate.
""" """
if not self.is_valid_coordinate(coordinate): if not self.is_valid_coordinate(coordinate):
raise CellDoesNotExist() raise CellDoesNotExist(f"No cell exists at {coordinate!r}.")
row_index, column_index = coordinate row_index, column_index = coordinate
row_key = self._row_locations.get_key(row_index) row_key = self._row_locations.get_key(row_index)
column_key = self._column_locations.get_key(column_index) column_key = self._column_locations.get_key(column_index)