Skip to content

feat: align, rather than indent, error causes - #3736

Merged
11 commits merged into
masterfrom
ens/error-output
May 2, 2024
Merged

feat: align, rather than indent, error causes#3736
11 commits merged into
masterfrom
ens/error-output

Conversation

@ghost

@ghost ghost commented May 2, 2024

Copy link
Copy Markdown

Description

Rather than increasing indentation, dfx now displays each error cause on its own line.

Also changed error types to report error causes as causes, rather than embedding their error cause in the error text.

Before:

Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed to build all canisters.
    Failed while trying to build all canisters.
      The build step failed for canister 'bw4dl-smaaa-aaaaa-qaacq-cai' (wasminst_backend) with an embedded error: Failed to build Motoko canister 'wasminst_backend'.: Failed to compile Motoko.: Failed to run 'moc'.: The command '"/Users/ericswanson/.cache/dfinity/versions/0.19.0/moc" ... params ...  failed with exit status 'exit status: 1'.
Stdout:

Stderr:
/Users/ericswanson/w/wasminst/src/wasminst_backend/main2.mo: No such file or directory

After:

Error: Failed while trying to deploy canisters.
Caused by: Failed to build all canisters.
Caused by: Failed while trying to build all canisters.
Caused by: The build step failed for canister 'bw4dl-smaaa-aaaaa-qaacq-cai' (wasminst_backend)
Caused by: Failed to build Motoko canister 'wasminst_backend'.
Caused by: Failed to compile Motoko.
Caused by: Failed to run 'moc'.
Caused by: The command '"/Users/ericswanson/.cache/dfinity/versions/0.20.0/moc" ... params ... failed with exit status 'exit status: 1'.
Stdout:

Stderr:
/Users/ericswanson/w/wasminst/src/wasminst_backend/main2.mo: No such file or directory

How Has This Been Tested?

..

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@ghost
ghost requested review from a team and chenyan-dfinity as code owners May 2, 2024 19:36
@ghost
ghost marked this pull request as draft May 2, 2024 19:37
@ghost ghost changed the title Ens/error output feat: align, rather than indent, error causes May 2, 2024
@ghost
ghost marked this pull request as ready for review May 2, 2024 20:02
@ghost
ghost enabled auto-merge (squash) May 2, 2024 20:44
@ghost
ghost merged commit 04b850b into master May 2, 2024
@ghost
ghost deleted the ens/error-output branch May 2, 2024 21:49
This pull request was closed.
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.

1 participant