aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-03-31 12:42:41 -0600
committerBen Burdette <bburdette@gmail.com>2020-03-31 12:42:41 -0600
commit5b3aefff857d038d49ad9a5d92371b4f6b19e8b9 (patch)
tree7f2bd332d70942bec145156182ce644387192db9 /src
parent9e7b89bf100500cf252f785e2dd77f83ee5cf7a4 (diff)
add some explanatory comments
Diffstat (limited to 'src')
-rw-r--r--src/libutil/error.cc4
-rw-r--r--src/libutil/error.hh2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc
index c986affcc..5384248f8 100644
--- a/src/libutil/error.cc
+++ b/src/libutil/error.cc
@@ -152,12 +152,14 @@ void printErrorInfo(ErrorInfo &einfo)
// lines of code.
if (einfo.nixCode.has_value())
+ {
printCodeLines(prefix, *einfo.nixCode);
+ cout << prefix << endl;
+ }
// hint
if (einfo.hint.has_value())
{
- cout << prefix << endl;
cout << prefix << *einfo.hint << endl;
cout << prefix << endl;
}
diff --git a/src/libutil/error.hh b/src/libutil/error.hh
index cd2b2832d..00539f06a 100644
--- a/src/libutil/error.hh
+++ b/src/libutil/error.hh
@@ -257,6 +257,7 @@ typedef AddName<
AddDescription<
AddHint<
EIError>>> ProgramError;
+
typedef AddName<
AddDescription<
AddHint<
@@ -270,6 +271,7 @@ typedef AddName<
AddLOC<
AddHint<
EIError>>>>>>> NixLangError;
+
typedef AddName<
AddDescription<
AddNixFile<