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
Practical usage of the lib shown design solutions for error handling could be improved.
Firstly, ExceptionThrowerInterface proved to be inefficient solution due to PHP specifics. When exception is thrown it contains trace to the code place where is was created but not where it was thrown. Therefore the first trace frame always points to ExceptionThrowerInterface implementation which makes the trace less easy to use. Proposed solution: throw native exceptions.
Secondly, having a JsonApiException and ErrorCollection classes appear to be very practical for error handling of all sorts (application logic, validation, etc). Such classes have to be added to the lib and used instead of ExceptionThrowerInterface.
Thirdly, RendererContainerInterface and RendererInterface with it's implementations are not used. Better solution could be build around JsonApiException + JSON API Errors. Should be removed from the lib.
The text was updated successfully, but these errors were encountered:
Practical usage of the lib shown design solutions for error handling could be improved.
Firstly,
ExceptionThrowerInterface
proved to be inefficient solution due to PHP specifics. When exception is thrown it contains trace to the code place where is was created but not where it was thrown. Therefore the first trace frame always points toExceptionThrowerInterface
implementation which makes the trace less easy to use. Proposed solution: throw native exceptions.Secondly, having a
JsonApiException
andErrorCollection
classes appear to be very practical for error handling of all sorts (application logic, validation, etc). Such classes have to be added to the lib and used instead ofExceptionThrowerInterface
.Thirdly,
RendererContainerInterface
andRendererInterface
with it's implementations are not used. Better solution could be build aroundJsonApiException
+ JSON API Errors. Should be removed from the lib.The text was updated successfully, but these errors were encountered: