c63af2e7ad
Replaces 'debugMessage' by specialized debug function 'Debug::log'. This function takes the same arguments as the previous 'debugMessage'. A separate Debug class allows for further optimization and separation of concern.
12 lines
231 B
PHP
12 lines
231 B
PHP
<?php
|
|
function returnError($message, $code){
|
|
throw new \HttpException($message, $code);
|
|
}
|
|
|
|
function returnClientError($message){
|
|
returnError($message, 400);
|
|
}
|
|
|
|
function returnServerError($message){
|
|
returnError($message, 500);
|
|
}
|