https://github.com/alexdodonov/mezon-rest-exception
REST exception class
https://github.com/alexdodonov/mezon-rest-exception
Last synced: 3 months ago
JSON representation
REST exception class
- Host: GitHub
- URL: https://github.com/alexdodonov/mezon-rest-exception
- Owner: alexdodonov
- Created: 2020-02-19T20:20:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T16:53:33.000Z (about 4 years ago)
- Last Synced: 2025-06-15T16:40:44.517Z (4 months ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# REST Exception [](https://travis-ci.com/alexdodonov/mezon-rest-exception) [](https://codecov.io/gh/alexdodonov/mezon-rest-exception)
## Installation
Just type
```
composer require mezon/rest-exception
```# Learn more
More information can be found here:
[Twitter](https://twitter.com/mezonphp)
[dev.to](https://dev.to/alexdodonov)
## Usage
To use this class is very simple thing:
```PHP
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
"Warning!" // HTTP request body
));
```