exception handler and bug fixes

This commit is contained in:
Sander Land committed 2020-06-04 23:26:44 +02:00
1 parent 372a98ae1f
commit 20f4598410
6 files changed
+100 -23

No files matched your search

+3 -2
View File
@@ -1,7 +1,7 @@
import copy
import json
import subprocess
import sys
import traceback
import threading
import time
from typing import Callable, Optional
@@ -157,7 +157,8 @@ class KataGoEngine:
if getattr(self.katrain, "update_state", None): # easier mocking etc
self.katrain.update_state()
except Exception as e:
self.katrain.log(f"Unexpected exception while processing KataGo output {line}", OUTPUT_ERROR)
traceback.print_exc(e)
self.katrain.log(f"Unexpected exception {e} while processing KataGo output {line}", OUTPUT_ERROR)
def send_query(self, query, callback, error_callback, next_move=None):
with self._lock: