refactors rpc_errors and defines internal errors

This commit is contained in:
Sergi Delgado Segura
2019-06-20 14:57:00 +01:00
parent 72def85ec9
commit 531f2104c9
2 changed files with 14 additions and 1 deletions

13
pisa-btc/pisa/errors.py Normal file
View File

@@ -0,0 +1,13 @@
# Appointment errors
APPOINTMENT_EMPTY_FIELD = -1
APPOINTMENT_WRONG_FIELD_TYPE = -2
APPOINTMENT_WRONG_FIELD_SIZE = -3
APPOINTMENT_WRONG_FIELD_FORMAT = -4
APPOINTMENT_FIELD_TOO_SMALL = -5
APPOINTMENT_FIELD_TOO_BIG = -6
APPOINTMENT_WRONG_FIELD = -7
APPOINTMENT_CIPHER_NOT_SUPPORTED = -8
APPOINTMENT_HASH_FUNCTION_NOT_SUPPORTED = -9

View File

@@ -1,7 +1,7 @@
from queue import Queue
from threading import Thread
from pisa.zmq_subscriber import ZMQHandler
from pisa.errors import *
from pisa.rpc_errors import *
from utils.authproxy import AuthServiceProxy, JSONRPCException
from conf import BTC_RPC_USER, BTC_RPC_PASSWD, BTC_RPC_HOST, BTC_RPC_PORT