diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-03-27 10:13:46 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-03-27 10:13:46 -0600 |
commit | 00eb3fcb7a19a38d5ca94f4dcbda149f16e73a6e (patch) | |
tree | 187d634ad27f260b33db84450e51924b4be4035f /src/libutil | |
parent | a3ef00be6c668bd59a879a4acdb1599225d86b44 (diff) |
more cleanup
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/error.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc index d6595070f..9194539a5 100644 --- a/src/libutil/error.cc +++ b/src/libutil/error.cc @@ -104,13 +104,13 @@ void printErrorInfo(ErrorInfo &einfo) } default: { - levelString = "wat:"; + levelString = format("invalid error level: %1%") % einfo.level; break; } } int ndl = prefix.length() + levelString.length() + 3 + einfo.name.length() + einfo.programName.value_or("").length(); - int dashwidth = ndl > (errwidth - 3) ? 3 : 80 - ndl; + int dashwidth = ndl > (errwidth - 3) ? 3 : errwidth - ndl; string dashes; for (int i = 0; i < dashwidth; ++i) @@ -161,7 +161,6 @@ void printErrorInfo(ErrorInfo &einfo) cout << prefix << *einfo.hint << endl; cout << prefix << endl; } - } } |