-
Notifications
You must be signed in to change notification settings - Fork 82
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
MAGECLOUD-1193: Enable strict errors #71
MAGECLOUD-1193: Enable strict errors #71
Conversation
src/App/ErrorHandler.php
Outdated
* @return bool | ||
* @throws \Exception | ||
*/ | ||
public function handler($errorNo, $errorStr, $errorFile, $errorLine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this method should be named as "handle"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/App/ErrorHandler.php
Outdated
|
||
$msg = isset($this->errorPhrases[$errorNo]) ? $this->errorPhrases[$errorNo] : "Unknown error ({$errorNo})"; | ||
$msg .= ": {$errorStr} in {$errorFile} on line {$errorLine}"; | ||
throw new \Exception($msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why notice or strict should throw an exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fail fast principle
QA check is not needed for this PR. |
https://magento2.atlassian.net/browse/MAGECLOUD-1193
Description
This PR add strict errors handling to avoid dummy errors.
Contribution checklist