message: test: Print both messages on failure in assert_raises_message
diff: @@ -56,7 +56,9 @@ def assert_raises_message(exc, message, fun, *args, **kwds):
  raise AssertionError("Use assert_raises_rpc_error() to test RPC failures")
  except exc as e:
  if message is not None and message not in e.error['message']:
  - raise AssertionError("Expected substring not found:" + e.error['message'])
  + raise AssertionError(
  + "Expected substring not found in error message:\nsubstring: '{}'\nerror message: '{}'.".format(
  + message, e.error['message']))
  except Exception as e:
  raise AssertionError("Unexpected exception raised: " + type(e).__name__)
  else:
  @@ -116,7 +118,9 @@ def try_rpc(code, message, fun, *args, **kwds):
  if (code is not None) and (code != e.error["code"]):
  raise AssertionError("Unexpected JSONRPC error code %i" % e.error["code"])
  if (message is not None) and (message not in e.error['message']):
  - raise AssertionError("Expected substring not found:" + e.error['message'])
  + raise AssertionError(
  + "Expected substring not found in error message:\nsubstring: '{}'\nerror message: '{}'.".format(
  + message, e.error['message']))
  return True
  except Exception as e:
  raise AssertionError("Unexpected exception raised: " + type(e).__name__)
  