-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathWikiMediaApiErrorLog.cs
More file actions
42 lines (37 loc) · 1.21 KB
/
WikiMediaApiErrorLog.cs
File metadata and controls
42 lines (37 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WikiAccess
{
public class WikiMediaApiErrorLog : ErrorLog
{
public string Module {get {return "A";}}
public List<ErrorMessage> Errors { get; set; }
public WikiMediaApiErrorLog()
{
Errors = new List<ErrorMessage>();
#if DEBUG
Errors.Add(new ErrorMessage(Module, 0, "WikimediaAPI module"));
#endif
}
/// <summary>
/// Web server is not contactable. Either no Internet or an invalid URL
/// </summary>
public void CannotAccessWiki(string url,string systemMessage)
{
Errors.Add(new ErrorMessage(Module, 1, "Unable to contact Wiki URL " + url,systemMessage));
}
/// <summary>
/// No file was grabbed from the internet page. Unknown reason.
/// </summary>
public void NoFileDownloaded()
{
Errors.Add(new ErrorMessage(Module,2,"No file downloaded"));
}
public void UnableToRetrieveDownload(string systemMessage)
{
Errors.Add(new ErrorMessage(Module, 3, "Unable to retrieve Download", systemMessage));
}
}
}