例外#
這裡介紹 PyPtt 的例外。
可以用 try…except… 來處理。
例外的種類
- exception PyPtt.exceptions.RequireLogin#
需要登入。
- exception PyPtt.exceptions.NoPermission#
沒有權限。
- exception PyPtt.exceptions.LoginError#
登入失敗。
- exception PyPtt.exceptions.NoFastComment#
無法快速推文。
- exception PyPtt.exceptions.NoSuchUser#
查無此使用者。
- exception PyPtt.exceptions.NoSuchMail#
查無此信件。
- exception PyPtt.exceptions.NoMoney#
餘額不足。
- exception PyPtt.exceptions.NoSuchBoard#
查無此看板。
- exception PyPtt.exceptions.ConnectionClosed#
連線已關閉。
- exception PyPtt.exceptions.UnregisteredUser#
未註冊使用者。
- exception PyPtt.exceptions.MultiThreadOperated#
同時使用多個 thread 呼叫 PyPtt 。
- exception PyPtt.exceptions.WrongIDorPassword#
帳號或密碼錯誤。
- exception PyPtt.exceptions.WrongPassword#
密碼錯誤。
- exception PyPtt.exceptions.LoginTooOften#
登入太頻繁。
- exception PyPtt.exceptions.UseTooManyResources#
使用過多資源。
- exception PyPtt.exceptions.CantComment#
禁止推文。
- exception PyPtt.exceptions.CantResponse#
已結案並標記, 不得回應。
- exception PyPtt.exceptions.NeedModeratorPermission#
需要版主權限。
- exception PyPtt.exceptions.ConnectError#
連線失敗。
- exception PyPtt.exceptions.NoSuchPost#
文章不存在。
- exception PyPtt.exceptions.CanNotUseSearchPostCode#
無法使用搜尋文章代碼。
- exception PyPtt.exceptions.MailboxFull#
信箱已滿。
- exception PyPtt.exceptions.NoSearchResult#
搜尋結果為空。
- exception PyPtt.exceptions.OnlySecureConnection#
只能使用安全連線。
- exception PyPtt.exceptions.SetContactMailFirst#
請先設定聯絡信箱。
- exception PyPtt.exceptions.ResetYourContactEmail#
請重新設定聯絡信箱。