URI: 
       tMade the first json-rpc error message have more detail - electrum-personal-server - Maximally lightweight electrum server for a single user
  HTML git clone https://git.parazyd.org/electrum-personal-server
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit 4a0f7338d62a287fc76910be144270c0dc46683a
   DIR parent febdaf7b7a5cd2cc3defcec347a9f26fea5c5fe2
  HTML Author: chris-belcher <chris-belcher@users.noreply.github.com>
       Date:   Thu, 29 Mar 2018 18:34:15 +0100
       
       Made the first json-rpc error message have more detail
       
       Diffstat:
         M electrumpersonalserver/jsonrpc.py   |       6 +-----
         M server.py                           |       4 +++-
       
       2 files changed, 4 insertions(+), 6 deletions(-)
       ---
   DIR diff --git a/electrumpersonalserver/jsonrpc.py b/electrumpersonalserver/jsonrpc.py
       t@@ -5,11 +5,7 @@ import base64
        import http.client
        import json
        
       -class JsonRpcError(Exception):
       -    def __init__(self, obj):
       -        self.code = obj["code"]
       -        self.message = obj["message"]
       -
       +class JsonRpcError(Exception): pass
        class JsonRpcConnectionError(JsonRpcError): pass
        
        class JsonRpc(object):
   DIR diff --git a/server.py b/server.py
       t@@ -2,6 +2,7 @@
        
        import socket, time, json, datetime, struct, binascii, ssl, os.path, platform
        from configparser import ConfigParser, NoSectionError, NoOptionError
       +import traceback
        
        from electrumpersonalserver.jsonrpc import JsonRpc, JsonRpcError
        import electrumpersonalserver.hashes as hashes
       t@@ -427,8 +428,9 @@ def main():
            while bestblockhash[0] == None:
                try:
                    bestblockhash[0] = rpc.call("getbestblockhash", [])
       -        except TypeError:
       +        except JsonRpcError as e:
                    if not printed_error_msg:
       +                log("Error: " + repr(e))
                        log("Error with bitcoin rpc, check host/port/user/password")
                        printed_error_msg = True
                    time.sleep(5)