From dd700ab3d39c14ccd0e25fb50e6fb23efacd8e2c Mon Sep 17 00:00:00 2001 From: Martin Klepsch Date: Thu, 22 Feb 2018 10:03:31 +0100 Subject: [PATCH] improve exception when contract cannot be loaded --- src/clj/commiteth/eth/token_registry.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/clj/commiteth/eth/token_registry.clj b/src/clj/commiteth/eth/token_registry.clj index 9135f8d..4d1ddea 100644 --- a/src/clj/commiteth/eth/token_registry.clj +++ b/src/clj/commiteth/eth/token_registry.clj @@ -37,6 +37,7 @@ ([addr] (println "addr" addr) (let [contract (load-tokenreg-contract addr)] + (assert contract (format "Could not load contract for addr %s" addr)) ;(assert (.isValid contract)) ;; web3j's isValid can't be trusted... (let [token-count (-> contract .tokenCount .get .getValue)] (log/debug "token-count" token-count)