error = get_class($exception); $result->message = $exception->getMessage(); echo json_encode($result);