contracts: Get rid of the dreaded Other error (#10595)

* Print more detailed error when instrumentation fails

* Apply suggestions from code review

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Check contents of debug buffer

* Fix test

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
Alexander Theißen
2022-01-17 11:45:28 +02:00
committed by GitHub
parent 8aefbb9f2f
commit 89194f0e70
5 changed files with 75 additions and 24 deletions
+2 -2
View File
@@ -122,8 +122,8 @@ where
original_code: Vec<u8>,
schedule: &Schedule<T>,
owner: AccountIdOf<T>,
) -> Result<Self, DispatchError> {
prepare::prepare_contract(original_code, schedule, owner).map_err(Into::into)
) -> Result<Self, &'static str> {
prepare::prepare_contract(original_code, schedule, owner)
}
/// Store the code without instantiating it.