Example #1
0
/** Emit an "Server Error" document and Exit. Use this when the server fails.
*
*	@param String $msg (optional) Message
*	@returns **NEVER RETURNS**
**/
function json_EmitServerError($msg = null)
{
    json_Emit(json_newErrorResponse(500, $msg));
    exit;
}
Example #2
0
function json_EmitFatalError($code = 400, $msg = null, $data = null)
{
    json_Emit(json_newErrorResponse($code, $msg, $data));
    exit;
}