| Issue 12: | 無法從method的回傳值知道太多錯誤訊息 | |
| Back to list |
每次呼叫一個方法像是 $result = $plurk->delete_plurk ('123456' );
由於回傳結果只會告知 true of false , 沒辦法從當中知道為什麼這個操作失敗了,
失敗的原因是什麼。
有太多地方用下列的方式處理掉了
return ($this->http_status == '200') ? TRUE : FALSE;
建議可以添加一個錯誤控制的方法,例如:
if ( $this->debug_mode ) {
return $this->plurk(PLURK_TIMELINE_PLURK_DELETE, $array);
}
else {
$result = $this->plurk(PLURK_TIMELINE_PLURK_DELETE, $array);
return ($this->http_status == '200') ? TRUE : FALSE;
}
Feb 3, 2010
Project Member
#3
roga.lin
Labels:
-Priority-Medium Priority-Low
May 6, 2010
請用新版本的 php-plurk-api 所有錯誤訊息均會紀錄在 log 檔內。
May 6, 2010
(No comment was entered for this change.)
Status:
Done
|