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

Cleanup error handler calls for future migration #18696

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Pierstoval
Copy link
Collaborator

Final goal would be to leave error handling entirely to Symfony, and convert all existing "error handling" code in GLPI to either exceptions OR to trigger_error calls.

This first cleanup is here to standardize this with the 4 current identified cases (error or exception, and for each either log and/or output), there might be a bit too much new code (it covers all cases, the goal is to have none of these cases in the future) but part of it will be in the new error handling system anyway

@Pierstoval Pierstoval force-pushed the error-handler branch 4 times, most recently from 2b4b38b to d9b0e80 Compare January 13, 2025 11:38
Comment on lines 212 to 213
ErrorHandler::getInstance()->handleException($e, true);
ErrorUtils::logException($e);
ErrorUtils::outputExceptionMessage($e);
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems there are multiple places where a single line is replaced with 2 new ones. That's not really easy to understand and may be confusing.

Also, many things have changed regarding errro management, maybe a £ explaining how we should handle them correctly in the developper documentation would be a good thing.

Copy link
Member

Choose a reason for hiding this comment

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

This double call is going to change. PR is still a draft.

I agree that the documentation should be update, I will take care of this once this PR will be finished.

@cedric-anne cedric-anne marked this pull request as draft January 13, 2025 12:42
@cedric-anne cedric-anne added this to the 11.0.0 milestone Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants