PHP Classes

Mezon REST Exception package blog

Recommend this page to a friend!

Latest Mezon REST Exception package blog posts

  All package blogs All package blogs   Mezon REST Exception Mezon REST Exception   Blog Mezon REST Exception package blog   Post article Post article  

1. How to Implement Better PHP REST API Exception Handling Adding More Details About the Exception Context

Updated on: 2021-03-06

Posted on:

Exceptions are special kind of class that is useful to pass details of errors that may happen within an application.

Usually exception classes carry information about the errors that includes an error message and an error code that can be useful to help applications to treat the errors in a a more convenient way for its users.

This package extends the information that is usually stored in an exception class. It adds details like the HTTP status code, request body and request URL, which may be useful for instance to generate error logs for applications that implement APIs.


Blog More ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)


  All package blogs All package blogs   Mezon REST Exception Mezon REST Exception   Blog Mezon REST Exception package blog   Post article Post article