You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does the use of error_log and trigger_error in psalm's code base follow some logic or is it random? Sometimes trigger_error, sometimes error_log (which has Psalm's own error handler attached) is used.
Perhaps this should be made consistent?
trigger_error has the advantage of being universal (and can be universally overwritten by a custom error handler by the user), while error_log has a custom error handler (which ultimately ends up in a custom error handler again if the user has one and also needs time to maintain.) Perhaps remove Psalm's internal error handler and move to trigger_error only?
The text was updated successfully, but these errors were encountered:
I count only two trigger_error in Psalm's code, both added by contributors and I count 20 error_log and many were added by Matt. AFAIK, error_log does not cause issues at the moment so I'd prefer keeping error_log for now
Does the use of error_log and trigger_error in psalm's code base follow some logic or is it random? Sometimes trigger_error, sometimes error_log (which has Psalm's own error handler attached) is used.
Perhaps this should be made consistent?
trigger_error has the advantage of being universal (and can be universally overwritten by a custom error handler by the user), while error_log has a custom error handler (which ultimately ends up in a custom error handler again if the user has one and also needs time to maintain.) Perhaps remove Psalm's internal error handler and move to trigger_error only?
The text was updated successfully, but these errors were encountered: