better exception handling for out of memory errors and badly formatted prompts

This commit is contained in:
Lincoln Stein 2022-08-22 16:55:06 -04:00
parent 281e381cfc
commit e70169257e

View File

@ -90,7 +90,12 @@ def main_loop(t2i,parser,log):
done = True
break
elements = shlex.split(command)
try:
elements = shlex.split(command)
except ValueError as e:
print(str(e))
continue
if len(elements)==0:
continue
@ -133,6 +138,10 @@ def main_loop(t2i,parser,log):
except KeyboardInterrupt:
print('*interrupted*')
continue
except RuntimeError as e:
print(str(e))
continue
print("goodbye!")