소스 검색

Adding formatless error reporting in extractJSON part of orthancDatabaseBrowser

Andrej 1 년 전
부모
커밋
e9458331b3
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      orthancDatabaseBrowser.py

+ 6 - 0
orthancDatabaseBrowser.py

@@ -11,7 +11,13 @@ def extractJSON(data):
       try:
          return json.loads(data.decode(x))
       except UnicodeDecodeError:
+         pass
+
+      try:
          print(f'Failed to decode with [{x}]: {data}')
+      except SyntaxError:
+         print('Failed to decode with [{}]: {}'.format(x,data))
+
    return None