You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exit codes from 0 to 127 are reserved for TVM or FunC and from 128 to 255 for Tact. Only the range from 256 to 65535 is free for developer-defined exit codes.
// Bad example that illustrates the problemcontractFoo {
constNotOwnerExitCode: Int=128;
receive("foobar") {
nativeThrowUnless(self.NotOwnerExitCode, sender() ==self.owner);
}
}
Use instead:
contractFoo {
constNotOwnerExitCode: Int=256; // <-- exit code from the allowed rangereceive("foobar") {
nativeThrowUnless(self.NotOwnerExitCode, sender() ==self.owner);
}
}
The text was updated successfully, but these errors were encountered:
Summary
Exit codes from 0 to 127 are reserved for TVM or FunC and from 128 to 255 for Tact. Only the range from 256 to 65535 is free for developer-defined exit codes.
Context
https://docs.tact-lang.org/book/exit-codes
Examples
Use instead:
The text was updated successfully, but these errors were encountered: