processError method

void processError(
  1. String method,
  2. Map<String, dynamic> res
)

Error processing helper

Implementation

void processError(String method, Map<String, dynamic> res) {
  if (res.isEmpty) {
    if (printError) {
      print('ERROR::$method - No status returned - Protocol failure}');
    }
  } else {
    final error = res[EthereumConstants.ethErrorKey];
    lastError.updateError(error['code'], error['message'], rpcClient.id);
    if (printError) {
      print('ERROR::$method - ${lastError.toString()}');
    }
  }
}