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
The $profile->set() method raises exceptions for both illegal profile property values and API contract violations. In an application we want to handle these to cases differently. Errors resulting from illegal property values should be reported back to the user (in case the value was provided by a user), but other errors should be logged as internal errors.
Today code that calls $profile->set() doesn't have a good way to distinguish between user errors and internal errors.
The $profile-set() API should be updated with a robust way to distinguish validation errors from API contract errors.
Since this allows callers to do something new this change is at least minor. One way to implement it in a non-breaking way would be to wrap the API contract violation exceptions in a special error class with the "" operator overloaded.
The text was updated successfully, but these errors were encountered:
The
$profile->set()
method raises exceptions for both illegal profile property values and API contract violations. In an application we want to handle these to cases differently. Errors resulting from illegal property values should be reported back to the user (in case the value was provided by a user), but other errors should be logged as internal errors.Today code that calls
$profile->set()
doesn't have a good way to distinguish between user errors and internal errors.The
$profile-set()
API should be updated with a robust way to distinguish validation errors from API contract errors.Since this allows callers to do something new this change is at least minor. One way to implement it in a non-breaking way would be to wrap the API contract violation exceptions in a special error class with the
""
operator overloaded.The text was updated successfully, but these errors were encountered: