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

[FEATURE] CLI: Improve error reporting #256

Merged
merged 4 commits into from
Oct 14, 2019
Merged

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented Oct 11, 2019

Yargs errors (like 'Unkown argument') do not print the command help
anymore but a hint to use 'ui5 --help'.

Exceptions are now formatted in a nice way.

On default log level only the error message is printed out and a hint to
use the --verbose flag for details.

On verbose log level, the stack trace is printed as well and a hint
featuring the URL to open a new issue for the UI5 Tooling module that
is most likely at fault based on an analysis of the first line of the
stack trace.

Examples

Exception on default log level:
exception default log level

Exception on verbose log level:
exception verbose log level

Unknown argument:
unknown argument

Note

The new dependency chalk is already a dependency of update-notifier

This depends on SAP/ui5-logger#136

@RandomByte
Copy link
Member Author

TODO: Code Coverage of new code in base middleware

@matz3
Copy link
Member

matz3 commented Oct 14, 2019

Nice 👍

Yargs errors (like 'Unkown argument') do not print the command help
anymore but a hint to use 'ui5 --help'.

Exceptions are now formatted in a nice way.

On default log level only the error message is printed out and a hint to
use the --verbose flag for details.

On verbose log level, the stack trace is printed as well and a hint
featuring the URL to open a new issue for the UI5 Tooling module that
is most likely at fault based on an analysis of the first line of the
stack trace.
@coveralls
Copy link

coveralls commented Oct 14, 2019

Coverage Status

Coverage increased (+3.4%) to 89.375% when pulling d72e433 on improve-error-reporting into 0394f1a on master.

@RandomByte
Copy link
Member Author

Code covered now 👍

@RandomByte RandomByte merged commit 1581b3d into master Oct 14, 2019
@RandomByte RandomByte deleted the improve-error-reporting branch October 14, 2019 14:42
RandomByte added a commit that referenced this pull request Apr 21, 2023
* No help is printed on yargs errors, so do not refer to it
  (also see #256)
* Only mention 'ui5 --help'
d3xter666 pushed a commit that referenced this pull request Apr 24, 2023
* No help is printed on yargs errors, so do not refer to it
  (also see #256)
* Only mention 'ui5 --help'
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.

3 participants