Skip to content

Expand documentation of error codes for smart contracts #202

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

Closed
abizjak opened this issue Jul 21, 2021 · 2 comments · Fixed by #350
Closed

Expand documentation of error codes for smart contracts #202

abizjak opened this issue Jul 21, 2021 · 2 comments · Fixed by #350
Assignees
Labels
Core Blockchain For core blockchain team documentation Improvements or additions to documentation [Type] Task An additional feature or improvement.

Comments

@abizjak
Copy link
Contributor

abizjak commented Jul 21, 2021

Task description

There is bare-bones documentation of error codes in https://developer.concordium.software/en/mainnet/smart-contracts/guides/custom-errors.html

What is missing is listing of hard-coded error codes assigned to ParseError, (), NewContractNameError and LogError.

@abizjak abizjak added documentation Improvements or additions to documentation [Type] Task An additional feature or improvement. labels Jul 21, 2021
@dg-concordium
Copy link
Contributor

@abizjak Do we have descriptions of these hardcoded error codes somewhere?

@abizjak
Copy link
Contributor Author

abizjak commented Dec 10, 2021

It's this list

Variant Error code
() i32::MIN + 1 (-2147483647)
ParseError i32::MIN + 2 (-2147483646)
LogError::Full i32::MIN + 3 (-2147483645)
LogError::Malformed i32::MIN + 4 (-2147483644)
NewContractNameError:://! MissingInitPrefix i32::MIN + 5 (-2147483643)
NewContractNameError::TooLong i32::MIN + 6 (-2147483642)
NewContractNameError::ContainsDot i32::MIN + 9 (-2147483639)
NewContractNameError::InvalidCharacters i32::MIN + 10 (-2147483638)
NewReceiveNameError::MissingDotSeparator i32::MIN + 7 (-2147483641)
NewReceiveNameError::TooLong i32::MIN + 8 (-2147483640)
NewReceiveNameError::InvalidCharacters i32::MIN + 11 (-2147483637)
NotPayableError i32::MIN + 12 (-2147483636)

@dg-concordium dg-concordium added the Core Blockchain For core blockchain team label Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Blockchain For core blockchain team documentation Improvements or additions to documentation [Type] Task An additional feature or improvement.
Projects
None yet
2 participants