test: Avoid empty errmsg in JSONRPCException
It is unclear why the fallback should be an empty message, when it is
better to include all rpc_error details that are available.
Also, include the http status.
This allows to revert commit 6354b4fd7f,
because it is no longer needed.
This commit is contained in:
2 files changed
+4
-9
No files matched your search
@@ -147,11 +147,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.log.exception(f"Called Process failed with stdout='{e.stdout}'; stderr='{e.stderr}';")
|
||||
self.success = TestStatus.FAILED
|
||||
except JSONRPCException as e:
|
||||
self.log.exception(f"Failure during setup: error={e.error}, http_status={e.http_status}")
|
||||
self.success = TestStatus.FAILED
|
||||
except BaseException:
|
||||
self.log.exception("Unexpected exception")
|
||||
# The `exception` log will add the exception info to the message.
|
||||
# https://docs.python.org/3/library/logging.html#logging.exception
|
||||
self.log.exception("Unexpected exception:")
|
||||
self.success = TestStatus.FAILED
|
||||
finally:
|
||||
exit_code = self.shutdown()
|
||||
|
||||
Reference in new issue
Block a user