• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

OmegaChartのソースコードの保守


Commit MetaInfo

Revisão09b9b86e3394638bd0a921aa679cd7ebbd07df50 (tree)
Hora2013-05-09 22:23:41
Autorpanacoran <panacoran@user...>
Commiterpanacoran

Mensagem de Log

HTTPエラー時のメッセージにURLを追加する

Mudança Sumário

Diff

--- a/Util.cs
+++ b/Util.cs
@@ -104,8 +104,17 @@ namespace Zanetti
104104 rq.ProtocolVersion = new Version(1,1);
105105 rq.Method = "GET";
106106 rq.Proxy = proxy;
107- HttpWebResponse rs = (HttpWebResponse)rq.GetResponse();
108-
107+ HttpWebResponse rs;
108+ try
109+ {
110+ rs = (HttpWebResponse)rq.GetResponse();
111+ }
112+ catch (WebException e)
113+ {
114+ if (e.Status != WebExceptionStatus.ProtocolError)
115+ throw;
116+ throw new Exception(e.Message + ": " + e.Response.ResponseUri, e);
117+ }
109118 //効率はわるいがWinHTTPが使えない環境用なのでまあいいだろう
110119 MemoryStream strm = new MemoryStream(0x18000);
111120 CopyStream(rs.GetResponseStream(), strm);