repl/InteractiveItemSelector: wrap execute_selection
in try-catch
This commit is contained in:
@ -73,7 +73,10 @@ class InteractiveItemSelector(Cmd):
|
||||
|
||||
|
||||
def default(self, arg: str):
|
||||
result = self.execute_selection(self.sql_session, self.cls, arg)
|
||||
try:
|
||||
result = self.execute_selection(self.sql_session, self.cls, arg)
|
||||
except Exception as e:
|
||||
print(f'Error executing selection: {e}')
|
||||
|
||||
if len(result) != 1:
|
||||
print(f'No such {self.cls.__name__} found: {arg}')
|
||||
|
Reference in New Issue
Block a user