mezon/rest-exception

Small rest-exception script

1.0.2 2021-08-11 16:53 UTC

This package is auto-updated.

Last update: 2024-11-11 23:57:59 UTC


README

Installation

Just type

composer require mezon/rest-exception

Learn more

More information can be found here:

Twitter

dev.to

Usage

To use this class is very simple thing:

throw(new \Mezon\Rest\Exception(
	"", // message of the exception, like in the standard Exception class
	-1, // code of the exception, like in the standard Exception class
	200, // HTTP code of the request
	"<p>Warning!" // HTTP request body
));