Json 에러시 에러 표기하도록

This commit is contained in:
2018-06-29 00:30:05 +09:00
parent 0a1cdeeaa3
commit aa33aa6d4f
+6 -6
View File
@@ -65,22 +65,22 @@ class WebUtil
//Use a switch statement to figure out the exact error.
switch ($jsonError) {
case JSON_ERROR_DEPTH:
$error .= 'Maximum depth exceeded!';
$error .= 'Maximum depth exceeded! : '.$content;
break;
case JSON_ERROR_STATE_MISMATCH:
$error .= 'Underflow or the modes mismatch!';
$error .= 'Underflow or the modes mismatch! : '.$content;
break;
case JSON_ERROR_CTRL_CHAR:
$error .= 'Unexpected control character found';
$error .= 'Unexpected control character found : '.$content;
break;
case JSON_ERROR_SYNTAX:
$error .= 'Malformed JSON';
$error .= 'Malformed JSON : '.$content;
break;
case JSON_ERROR_UTF8:
$error .= 'Malformed UTF-8 characters found!';
$error .= 'Malformed UTF-8 characters found! : '.$content;
break;
default:
$error .= 'Unknown error!';
$error .= 'Unknown error! : '.$content;
break;
}
throw new \Exception($error);