2016-09-25 23:22:33 +02:00
|
|
|
<?php
|
|
|
|
function returnError($message, $code){
|
2016-11-09 19:10:40 +01:00
|
|
|
throw new \HttpException($message, $code);
|
2016-09-25 23:22:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function returnClientError($message){
|
2016-11-09 19:10:40 +01:00
|
|
|
returnError($message, 400);
|
2016-09-25 23:22:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function returnServerError($message){
|
2016-11-09 19:10:40 +01:00
|
|
|
returnError($message, 500);
|
2016-09-25 23:22:33 +02:00
|
|
|
}
|