-
Notifications
You must be signed in to change notification settings - Fork 88
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
[CLI] set error_prefix to Error #728
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
.map(|_| "Success".to_owned()) | ||
.map_err(RoochError::from), | ||
MoveCommand::Errmap(mut c) => { | ||
c.error_prefix = Some("Error".to_owned()); |
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.
When using rooch move errmap
for move-stdlib. It will be Success
and generate an empty file. I'll add a fix to it.
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.
If users don't specify --error-prefix
flag, simply throw an error. For instance, in rooch-framework directory:
rooch move errmap
Invalid arguments: Error prefix not provided. Use --error-prefix "E" for move-stdlib, --error-prefix "Error" for moveos-stdlib and rooch-framework, etc.
rooch move errmap --error-prefix "A"
Invalid arguments: Invalid error prefix. Use --error-prefix "E" for move-stdlib, --error-prefix "Error" for moveos-stdlib and rooch-framework, etc.
rooch move errmap --error-prefix "E"
thread 'main' panicked at 'calledResult::unwrap()
on anErr
value: Duplicate entry for abort code 1 found in 0000000000000000000000000000000000000000000000000000000000000003::ecdsa_k1, previous entry: ErrorDescription {
code_name: "ECDSA_K1_TO_SCHEME_BITCOIN_LENGTH",
code_description: " constant codes",
}', /Users/system/.cargo/git/checkouts/move-d59e49550a684528/782ed81/language/move-prover/move-errmapgen/src/errmapgen.rs:69:47
note: run withRUST_BACKTRACE=1
environment variable to display a backtrace
rooch move errmap --error-prefix "Error"
Success
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.
And we should also limit the scope of using E
and Error
for move-stdlib and moveos-stdlib:
cd move-stdlib
rooch move errmap --error-prefix "Error"
Success
rooch move errmap --error-prefix "E"
Success
It should be throwing errors for using --error-prefix "Error" for move-stdlib, cause it will be an empty file.
cd moveos-stdlib
rooch move errmap --error-prefix "E"
Success
rooch move errmap --error-prefix "Error"
Success
For moveos-stdlib, it should be throwing errors when using flag --error-prefix "E", cause it will be an error map both to E
and Error
.
Summary
Set
rooch move errmap
error_prefix default toError
. Follow #664 , Ref #663