From 18aaeaa2844ae586e14a041a9f134acb52cb0374 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Thu, 2 Feb 2023 15:41:24 +0000 Subject: [PATCH] Add explanatory message to an exception in DataTable --- src/textual/widgets/_data_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textual/widgets/_data_table.py b/src/textual/widgets/_data_table.py index e82b76384..ae0c30e2d 100644 --- a/src/textual/widgets/_data_table.py +++ b/src/textual/widgets/_data_table.py @@ -693,7 +693,7 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True): The key of the cell currently occupying this 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_key = self._row_locations.get_key(row_index) column_key = self._column_locations.get_key(column_index)