-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds more descriptive and helpful error messages to the NFT contracts and txs #233
Conversation
contracts/ExampleNFT.cdc
Outdated
@@ -133,7 +133,7 @@ access(all) contract ExampleNFT: NonFungibleToken { | |||
resourceType: nil, | |||
viewType: Type<MetadataViews.EVMBridgedMetadata>() | |||
) as! MetadataViews.EVMBridgedMetadata? | |||
?? panic("Could not resolve contract-level EVMBridgedMetadata") | |||
?? panic("Could not resolve contract-level EVMBridgedMetadata.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imho resolving a view should never
Panic. Return nil.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! I'll remove that. Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really like the detailed error message, thanks for fixing these up! My main suggestion is not a blocker, but it would be great to see consistent formatting e.g. some messages wrap values in ()
or <>
and others prefix values with =
. In reality, this probably more of a preference/nitpick
@sisyphusSmiling Good point! I'll look through and make sure they are consistent. The only time I use |
Closes: #232
Based on guidelines in onflow/docs#795
Description
For contributor use:
master
branchFiles changed
in the Github PR explorer