From 0abb6303fcd343609bc063fb815150e47cadfb18 Mon Sep 17 00:00:00 2001 From: bg66 Date: Thu, 27 Sep 2007 02:24:12 +0000 Subject: [PATCH] (mixi-url-retrieve): Add a URL to error messages. (mixi-w3m-retrieve): Ditto. (mixi-curl-retrieve): Ditto. --- ChangeLog | 6 ++++++ mixi.el | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c7bc0d..3b87fea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-27 OHASHI Akira + + * mixi.el (mixi-url-retrieve): Add a URL to error messages. + (mixi-w3m-retrieve): Ditto. + (mixi-curl-retrieve): Ditto. + 2007-09-26 OHASHI Akira * sb-mixi.el (shimbun-get-headers): Use `shimbun-header-index-pages'. diff --git a/mixi.el b/mixi.el index 0f403de..36a878f 100644 --- a/mixi.el +++ b/mixi.el @@ -324,13 +324,13 @@ Increase this value when unexpected error frequently occurs." (buffer (url-retrieve-synchronously url)) ret) (unless (bufferp buffer) - (error (mixi-message "Cannot retrieve"))) + (error (mixi-message "Cannot retrieve: " url))) (with-current-buffer buffer (goto-char (point-min)) (while (looking-at "HTTP/[0-9]+\\.[0-9]+ [13][0-9][0-9]") (delete-region (point) (re-search-forward "\r?\n\r?\n"))) (unless (looking-at "HTTP/[0-9]+\\.[0-9]+ 200") - (error (mixi-message "Cannot retrieve"))) + (error (mixi-message "Cannot retrieve: " url))) (delete-region (point) (re-search-forward "\r?\n\r?\n")) (setq ret (decode-coding-string (buffer-string) mixi-coding-system)) (kill-buffer buffer) @@ -346,7 +346,7 @@ Increase this value when unexpected error frequently occurs." (let ((url (mixi-expand-url url))) (with-temp-buffer (if (not (string= (w3m-retrieve url nil nil post-data) "text/html")) - (error (mixi-message "Cannot retrieve")) + (error (mixi-message "Cannot retrieve: " url)) (w3m-decode-buffer url) (let ((ret (buffer-substring-no-properties (point-min) (point-max)))) (mixi-parse-buffer url ret post-data)))))) @@ -387,7 +387,7 @@ Increase this value when unexpected error frequently occurs." (while (looking-at "HTTP/[0-9]+\\.[0-9]+ [13][0-9][0-9]") (delete-region (point) (re-search-forward "\r?\n\r?\n"))) (unless (looking-at "HTTP/[0-9]+\\.[0-9]+ 200") - (error (mixi-message "Cannot retrieve"))) + (error (mixi-message "Cannot retrieve: " url))) (delete-region (point) (re-search-forward "\r?\n\r?\n")) (setq ret (decode-coding-string (buffer-string) mixi-coding-system)) (mixi-parse-buffer url ret post-data)))) -- 1.7.10.4