From 0b4283bb584f427bdec358587fcc94bdc5761daa Mon Sep 17 00:00:00 2001 From: mercierc Date: Wed, 21 Jul 2021 15:22:08 +1200 Subject: [PATCH] cat: improved error handling --- python/obitools3/commands/cat.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/obitools3/commands/cat.pyx b/python/obitools3/commands/cat.pyx index bfb63b2..c620dfc 100755 --- a/python/obitools3/commands/cat.pyx +++ b/python/obitools3/commands/cat.pyx @@ -134,7 +134,11 @@ def run(config): rep = repr(entry) output_0.write(str2bytes(rep)+b"\n") else: - o_view[i] = entry + try: + o_view[i] = entry + except: + print("\nError with entry:", repr(entry)) + print(repr(o_view)) i+=1 v.close()