-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBirthDeathTemplateErrorLog.cs
More file actions
52 lines (44 loc) · 1.49 KB
/
BirthDeathTemplateErrorLog.cs
File metadata and controls
52 lines (44 loc) · 1.49 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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WikiAccess;
namespace WikidataBioValidation
{
class BirthDeathTemplateErrorLog : ErrorLog
{
public string Module {get {return "T";}}
public List<ErrorMessage> Errors { get; set; }
public BirthDeathTemplateErrorLog()
{
Errors = new List<ErrorMessage>();
#if DEBUG
Errors.Add(new ErrorMessage(Module, 0, "BirthDeathTemplate module"));
#endif
}
public void NoTemplates()
{
Errors.Add(new ErrorMessage(Module, 1, "No templates"));
}
public void UnrecognisedTemplate(string template)
{
Errors.Add(new ErrorMessage(Module, 2, "Unrecognised template " + template));
}
public void ExceptionThrown(string template,string systemMessage)
{
Errors.Add(new ErrorMessage(Module, 3, "Exception thrown extracting date " + template, systemMessage));
}
public void SecondBirth(string template)
{
Errors.Add(new ErrorMessage(Module, 4, "Alternative date of birth found in " + template));
}
public void SecondDeath(string template)
{
Errors.Add(new ErrorMessage(Module, 5, "Alternative date of death found in " + template));
}
public void NoBirthDeathTemplate()
{
Errors.Add(new ErrorMessage(Module,6,"No Birth/Death template in article"));
}
}
}