Skip to content

Commit

Permalink
Merge pull request #63 from CosmWasm/better-error-logging
Browse files Browse the repository at this point in the history
Improved error logging when the message execution fails
  • Loading branch information
DariuszDepta authored Sep 14, 2023
2 parents b8b2b4b + 893c3e8 commit 60b9a69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ where
) -> AnyResult<AppResponse> {
self.execute_wasm(api, storage, router, block, sender.clone(), msg.clone())
.context(format!(
"error executing WasmMsg:\nsender: {}\n{:?}",
"Error executing WasmMsg:\n sender: {}\n {:?}",
sender, msg
))
}
Expand Down Expand Up @@ -663,7 +663,7 @@ where
if matches!(reply_on, ReplyOn::Always | ReplyOn::Error) {
let reply = Reply {
id,
result: SubMsgResult::Err(e.to_string()),
result: SubMsgResult::Err(format!("{:?}", e)),
};
self._reply(api, router, storage, block, contract, reply)
} else {
Expand Down

0 comments on commit 60b9a69

Please sign in to comment.