Skip to content
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

Remove cli stacktrace from cli error output #303

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

ross-weir
Copy link
Contributor

Addresses comment: #301 (comment)

New output from compile command:

Full node version: v2.5.7
Compiling contracts in folder "contracts"
✘ Failed to compile, error: [API Error] - org.alephium.ralph.Compiler$Error: -- error (9:3): Syntax error
9 |  event Hello(
  |  ^^^^^^^^^^
  |  Expected "}"
  |-------------------------------------------------------------------------------------
  |Trace log: Expected multiContract:1:1 / rawContract:1:1 / "}":9:3, found "event Fund"

packages/cli/cli.js Dismissed Show dismissed Hide dismissed
@@ -168,7 +174,7 @@ program
const toIndex = tryGetScriptIndex(options.to)
await deployAndSaveProgress(config, networkId, fromIndex, toIndex)
} catch (error) {
program.error(`Failed to deploy contracts, error: ${(error as Error).stack}`)
program.error(`Failed to deploy contracts, error: ${buildErrorOutput(error, options.debug)}`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If debug is enabled via the config file, should we also show the debug info? It looks good to keep the two debug flag consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If debug is enabled via the config file, should we also show the debug info? It looks good to keep the two debug flag consistent.

Yeah good point, updated

@polarker polarker merged commit cc62e49 into alephium:master Jan 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants