From c1e202618c60ffd09f12394da56da74120f2a656 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 15 Nov 2017 17:18:00 +0000 Subject: Add explanation to unimplemented assertions --- libsolidity/codegen/ABIFunctions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libsolidity/codegen/ABIFunctions.cpp') diff --git a/libsolidity/codegen/ABIFunctions.cpp b/libsolidity/codegen/ABIFunctions.cpp index 080be359..d2cbac99 100644 --- a/libsolidity/codegen/ABIFunctions.cpp +++ b/libsolidity/codegen/ABIFunctions.cpp @@ -483,7 +483,7 @@ string ABIFunctions::abiEncodingFunctionCalldataArray( _to.identifier() + (_encodeAsLibraryTypes ? "_library" : ""); return createFunction(functionName, [&]() { - solUnimplementedAssert(fromArrayType.isByteArray(), ""); + solUnimplementedAssert(fromArrayType.isByteArray(), "Only byte arrays can be encoded from calldata currently."); // TODO if this is not a byte array, we might just copy byte-by-byte anyway, // because the encoding is position-independent, but we have to check that. Whiskers templ(R"( @@ -754,7 +754,7 @@ string ABIFunctions::abiEncodingFunctionStruct( _to.identifier() + (_encodeAsLibraryTypes ? "_library" : ""); - solUnimplementedAssert(!_from.dataStoredIn(DataLocation::CallData), ""); + solUnimplementedAssert(!_from.dataStoredIn(DataLocation::CallData), "Encoding struct from calldata is not yet supported."); solAssert(&_from.structDefinition() == &_to.structDefinition(), ""); return createFunction(functionName, [&]() { -- cgit v1.2.3