rename errors/warnings
This commit is contained in:
parent
09652f597c
commit
9e7b89bf10
|
@ -256,11 +256,11 @@ class AddHint : private T
|
|||
typedef AddName<
|
||||
AddDescription<
|
||||
AddHint<
|
||||
EIError>>> StandardError;
|
||||
EIError>>> ProgramError;
|
||||
typedef AddName<
|
||||
AddDescription<
|
||||
AddHint<
|
||||
EIWarning>>> StandardWarning;
|
||||
EIWarning>>> ProgramWarning;
|
||||
|
||||
typedef AddName<
|
||||
AddDescription<
|
||||
|
@ -269,7 +269,7 @@ typedef AddName<
|
|||
AddColumnRange<
|
||||
AddLOC<
|
||||
AddHint<
|
||||
EIError>>>>>>> MkNixError;
|
||||
EIError>>>>>>> NixLangError;
|
||||
typedef AddName<
|
||||
AddDescription<
|
||||
AddNixFile<
|
||||
|
@ -277,7 +277,7 @@ typedef AddName<
|
|||
AddColumnRange<
|
||||
AddLOC<
|
||||
AddHint<
|
||||
EIWarning>>>>>>> MkNixWarning;
|
||||
EIWarning>>>>>>> NixLangWarning;
|
||||
|
||||
|
||||
// --------------------------------------------------------
|
||||
|
|
|
@ -14,44 +14,20 @@ int main()
|
|||
|
||||
ErrorInfo::programName = optional("error-test");
|
||||
|
||||
/*
|
||||
ColumnRange columnRange;
|
||||
columnRange.start = 24;
|
||||
columnRange.len = 14;
|
||||
|
||||
ErrLine errline;
|
||||
errline.lineNumber = 7;
|
||||
errline.columnRange = optional(columnRange);
|
||||
errline.errLineOfCode = "line of code where the error occurred";
|
||||
|
||||
NixCode nixcode;
|
||||
nixcode.nixFile = optional("myfile.nix");
|
||||
nixcode.errLine = errline;
|
||||
|
||||
ErrorInfo generic;
|
||||
generic.level = elError;
|
||||
generic.name = "error name";
|
||||
generic.description = "general error description";
|
||||
generic.program = "nixtool.exe";
|
||||
generic.nixCode = nixcode;
|
||||
|
||||
printErrorInfo(generic);
|
||||
*/
|
||||
|
||||
printErrorInfo(StandardError()
|
||||
printErrorInfo(ProgramError()
|
||||
.name("name")
|
||||
.description("error description")
|
||||
.nohint()
|
||||
);
|
||||
|
||||
printErrorInfo(StandardWarning()
|
||||
printErrorInfo(ProgramWarning()
|
||||
.name("warning name")
|
||||
.description("warning description")
|
||||
.nohint()
|
||||
);
|
||||
|
||||
|
||||
printErrorInfo(MkNixWarning()
|
||||
printErrorInfo(NixLangWarning()
|
||||
.name("warning name")
|
||||
.description("warning description")
|
||||
.nixFile("myfile.nix")
|
||||
|
@ -63,7 +39,7 @@ int main()
|
|||
.hint(hintfmt("this hint has %1% templated %2%!!") % "yellow" % "values")
|
||||
);
|
||||
|
||||
printErrorInfo(MkNixError()
|
||||
printErrorInfo(NixLangError()
|
||||
.name("error name")
|
||||
.description("error description")
|
||||
.nixFile("myfile.nix")
|
||||
|
|
Loading…
Reference in a new issue