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

Bug box in case of Program_Error and related tweaks #1595

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

mosteo
Copy link
Member

@mosteo mosteo commented Feb 27, 2024

Instead of the terse please re-run..., say something more informative and conducive to a report, but only for true Program_Error exceptions:

$ alr dev --raise
error: ******************* BEGIN Alire bug detected *******************
error: Location  : Alr.Commands.Dev.Execute at alr-commands-dev.adb:77
error: Extra info: Raising forcibly
error: Report at : https://github.com/alire-project/alire/issues/new?title=[Bug%20box]
error: Re-run with `-vv -d` for a full stack trace.
error: ******************** END Alire bug detected ********************

In very limited situations where we can continue, report instead a recoverable error:

$ alr dev --error
warn: ******************* BEGIN Alire bug detected *******************
warn: Location  : Alr.Commands.Dev.Execute at alr-commands-dev.adb:73
warn: Extra info: Forced error
warn: Report at : https://github.com/alire-project/alire/issues/new?title=[Bug%20box]
warn: Re-run with `-vv -d` for a full stack trace.
warn: Alire will now continue as the error might be recoverable.
warn: ******************** END Alire bug detected ********************

And finally clarify internally the difference with a Recoverable_User_Error.

@mosteo mosteo force-pushed the feat/bug-box branch 2 times, most recently from 4853532 to 546577f Compare February 27, 2024 15:26
@mosteo mosteo marked this pull request as ready for review February 27, 2024 16:12
Stack_Trace : String := "";
Stack_Offset : Natural := 0);
-- For unexpected situations where normally a Program_Error would be
-- adecuate, but we do not want to bomb on the user because continuing is
Copy link
Member

Choose a reason for hiding this comment

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

adequate?

Copy link
Member Author

Choose a reason for hiding this comment

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

My Spanglish seeping through

@mosteo mosteo merged commit 7d67c4b into alire-project:master Feb 28, 2024
27 checks passed
@mosteo mosteo deleted the feat/bug-box branch February 28, 2024 18:54
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