PHP Classes

How to Implement Better PHP REST API Exception Handling Adding More Details About the Exception Context - Mezon REST Exception package blog

Recommend this page to a friend!
  All package blogs All package blogs   Mezon REST Exception Mezon REST Exception   Blog Mezon REST Exception package blog   RSS 1.0 feed RSS 2.0 feed   Blog How to Implement Bett...  
  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Package: Mezon REST Exception

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.




Loaded Article

About the Mezon REST Exception Package

The package Mezon REST Exception is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Exception class to use in REST APIs applications

Here follows in more detail what it does:

This package provides an exception class to use in REST APIs applications.

It extends the base PHP Exception class to take parameters with values about the current HTTP request in order to provide more context information about the conditions that may trigger an exception.

Besides the exception code and exception message that is expected by the base PHP Exception class, it can also take parameters for the HTTP status code, HTTP request body and request URL.

Conclusion

The Mezon REST Exception can be downloaded from download page or be installed using the PHP Composer tool following instructions in the Composer install instructions page.

This package was considered notable for implementing its benefits in a way that is worth noticing.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package as well nice prizes.

One nice prize that many PHP developers want and you may like is the PHP elePHPant mascot plush.




You need to be a registered user or login to post a comment

Login Immediately with your account on:



Comments:

No comments were submitted yet.



  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   RSS 1.0 feed RSS 2.0 feed   Blog How to Implement Bett...