namespace Honememo.Wptscs.Logics
{
using System;
+ using System.Net;
using System.Text;
using Honememo.Parsers;
using Honememo.Utilities;
}
/// <summary>
+ /// 例外メッセージ(「→ 通信エラー」のようなメッセージ)を登録する。
+ /// </summary>
+ /// <param name="e">例外。</param>
+ public virtual void AddError(Exception e)
+ {
+ // 応答形式で例外メッセージを出力
+ this.AddResponse(e.Message);
+ if (e is WebException && ((WebException)e).Response != null)
+ {
+ // 出せるならエラーとなったURLも出力
+ this.AddResponse(Resources.LogMessageErrorURL, ((WebException)e).Response.ResponseUri);
+ }
+ }
+
+ /// <summary>
/// ログ上の区切りを登録する。
/// </summary>
public virtual void AddSeparator()