From 068e579a5f48e8a674422a28b4e719e46b16d17d Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Mon, 13 Jul 2015 08:23:51 -0400 Subject: [PATCH] Update error message for #156 Made the error more human friendly. --- libraries/chain/db_balance.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/chain/db_balance.cpp b/libraries/chain/db_balance.cpp index 90e00d65..0434239e 100644 --- a/libraries/chain/db_balance.cpp +++ b/libraries/chain/db_balance.cpp @@ -52,7 +52,10 @@ void database::adjust_balance(account_id_type account, asset delta ) auto itr = index.find(boost::make_tuple(account, delta.asset_id)); if(itr == index.end()) { - FC_ASSERT(delta.amount > 0); + FC_ASSERT( delta.amount > 0, "Insufficient Balance: ${a}'s balance of ${b} is less than required ${r}", + ("a",account(*this).name) + ("b",to_pretty_string(asset(0,delta.asset_id))) + ("r",to_pretty_string(-delta))); create([account,&delta](account_balance_object& b) { b.owner = account; b.asset_type = delta.asset_id;