Skip to content

[BOLT][NFC] Add BOLTError and return it from passes (1/2) #81522

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

Conversation

aaupov
Copy link
Contributor

@aaupov aaupov commented Feb 12, 2024

As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch we add a new class
BOLTError and auxiliary functions createFatalBOLTError() and
createNonFatalBOLTError() that allow BOLT code to bubble up the
problem to the caller by using the Error class as a return
type (or Expected). Also changes passes to use these.

Co-authored-by: Rafael Auler [email protected]

Test Plan: NFC

Created using spr 1.3.4
@aaupov aaupov changed the title [BOLT][NFC] Add BOLTError and return it from passes (1/n) [BOLT][NFC] Add BOLTError and return it from passes (1/2) Feb 12, 2024
Copy link
Contributor

@rafaelauler rafaelauler left a comment

Choose a reason for hiding this comment

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

Thanks, as commit message we can put something like:

As part of the effort to refactor old error handling code that
would directly call exit(1), in this patch we add a new class
BOLTError and auxiliary functions createFatalBOLTError() and
createNonFatalBOLTError() that allow BOLT code to bubble up the
problem to the caller by using the Error class as a return
type (or Expected). Also changes passes to use these.

@aaupov aaupov changed the base branch from users/aaupov/spr/main.boltnfc-add-bolterror-and-return-it-from-passes-1n to main February 12, 2024 22:37
Created using spr 1.3.4
@aaupov aaupov merged commit fa7dd49 into main Feb 12, 2024
@aaupov aaupov deleted the users/aaupov/spr/boltnfc-add-bolterror-and-return-it-from-passes-1n branch February 12, 2024 22:40
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