Finschia / cosmwasm

Fast and reusable WebAssembly smart contract runtime(and library) for finschia-sdk.
Apache License 2.0
27 stars 14 forks source link

fix: corrected to appropriate error message #321

Closed da1suk8 closed 1 year ago

da1suk8 commented 1 year ago

Description

Fix error messages to appropriate ones.

Closes #319

Types of changes

Checklist

loloicci commented 1 year ago

It looks enum's case name StorageError does not need to be changed, and only replacing the error message "Storage does not have the number" with "Storage does not have the address" is enough.

da1suk8 commented 1 year ago

It looks enum's case name StorageError does not need to be changed, and only replacing the error message "Storage does not have the number" with "Storage does not have the address" is enough.

Why?

Since another contract defines an enum with the same name, it does not seem like a good decision to use the same name and change only the error message.

https://github.com/Finschia/cosmwasm/blob/db084956732e1d1c101e7e9f7d0f92a734b6e633/contracts/number/src/error.rs#L10-L11

da1suk8 commented 1 year ago

@loloicci

I will adopt this Storage does not have the address, thank you!