-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathWikipediaIOErrorLog.cs
More file actions
59 lines (50 loc) · 1.62 KB
/
WikipediaIOErrorLog.cs
File metadata and controls
59 lines (50 loc) · 1.62 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WikiAccess
{
/// <summary>
/// Class to store errors pertaining to Wikipedia IO
/// </summary>
public class WikipediaIOErrorLog : ErrorLog
{
public string Module { get { return "W"; } }
public List<ErrorMessage> Errors { get; set; }
public WikipediaIOErrorLog()
{
Errors = new List<ErrorMessage>();
#if DEBUG
Errors.Add(new ErrorMessage(Module, 0, "WikipediaIO module"));
#endif
}
public void UnableToRetrieveData()
{
Errors.Add(new ErrorMessage(Module, 1, "Unable to retrieve data"));
}
public void UnableToParseXML()
{
Errors.Add(new ErrorMessage(Module, 2, "Unable to parse XML"));
}
public void ArticleNotExists()
{
Errors.Add(new ErrorMessage(Module, 3, "Wikipedia article does not exist"));
}
public void UnbalancedHTMLcomment()
{
Errors.Add(new ErrorMessage(Module,4, "Unbalanced HTML comments in article"));
}
public void UnbalancedCategoryBrackets()
{
Errors.Add(new ErrorMessage(Module,5, "Unbalanced Category brackets"));
}
public void UnbalancedTemplateBrackets()
{
Errors.Add(new ErrorMessage(Module,6, "Unbalanced Template brackets"));
}
public void UnableToExtractTemplate(string templateName)
{
Errors.Add(new ErrorMessage(Module, 7, "Unable to extract template " + templateName));
}
}
}