diff --git a/src/error-demo/error-demo.cc b/src/error-demo/error-demo.cc
index f8ec95533..a9ff6057c 100644
--- a/src/error-demo/error-demo.cc
+++ b/src/error-demo/error-demo.cc
@@ -11,21 +11,15 @@ int main()
     // In each program where errors occur, this has to be set.
     ErrorInfo::programName = std::optional("error-demo");
 
-    // There are currently four constructor functions:
-    //
-    // 			ProgramError, ProgramWarning, NixLangError, NixLangWarning.
-    //
-
-    // ProgramError takes name, description, and an optional hint.
+    // Error in a program; no hint and no nix code.
     printErrorInfo(
         ErrorInfo { .level = elError,
                     .name = "name",
                     .description = "error description",
                   });
 
-    // ProgramWarning takes name, description, and an optional hint.
-    // The hint is in the form of a hintfmt class, which wraps boost::format(),
-    // and makes all the substituted text yellow.
+    // Warning with name, description, and hint.
+    // The hintfmt function makes all the substituted text yellow.
     printErrorInfo(
         ErrorInfo { .level = elWarning,
                     .name = "name",
@@ -35,7 +29,7 @@ int main()
                   });
 
 
-    // NixLangWarning adds nix file, line number, column range, and the lines of
+    // Warning with nix file, line number, column, and the lines of
     // code where a warning occurred.
     SymbolTable testTable;
     auto problem_file = testTable.create("myfile.nix");
@@ -53,8 +47,7 @@ int main()
                 .nextLineOfCode = std::nullopt
             }});
 
-    // NixLangError is just the same as NixLangWarning, except for the Error
-    // flag.
+    // Error with previous and next lines of code.
     printErrorInfo(
         ErrorInfo{
             .level = elError,
diff --git a/src/libutil/error.hh b/src/libutil/error.hh
index 7e76c0079..8286eaab1 100644
--- a/src/libutil/error.hh
+++ b/src/libutil/error.hh
@@ -50,7 +50,7 @@ public:
 };
 
 // ----------------------------------------------------------------
-// format for hints.  same as fmt, except templated values
+// format function for hints.  same as fmt, except templated values
 // are always in yellow.
 
 template <class T>