aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-04-06 13:02:26 +0200
committerEelco Dolstra <edolstra@gmail.com>2022-04-08 11:31:51 +0200
commit168ef9f3ab73ac8ea2d8263304fd6df29a76e0e0 (patch)
tree2bc19782fee2bc5d3bd7c835337ff19c558aab79 /src/libutil
parent8b1e328d5d0ae7d3a4a8f6012ec065b59674ed4a (diff)
Remove unused Error.name field
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/error.cc3
-rw-r--r--src/libutil/error.hh1
-rw-r--r--src/libutil/serialise.cc5
3 files changed, 2 insertions, 7 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc
index 02bc5caa5..9172f67a6 100644
--- a/src/libutil/error.cc
+++ b/src/libutil/error.cc
@@ -21,12 +21,9 @@ const std::string & BaseError::calcWhat() const
if (what_.has_value())
return *what_;
else {
- err.name = sname();
-
std::ostringstream oss;
showErrorInfo(oss, err, loggerSettings.showTrace);
what_ = oss.str();
-
return *what_;
}
}
diff --git a/src/libutil/error.hh b/src/libutil/error.hh
index 6a757f9ad..005c2c225 100644
--- a/src/libutil/error.hh
+++ b/src/libutil/error.hh
@@ -109,7 +109,6 @@ struct Trace {
struct ErrorInfo {
Verbosity level;
- std::string name; // FIXME: rename
hintformat msg;
std::optional<ErrPos> errPos;
std::list<Trace> traces;
diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc
index 6445b3f1b..8ff904583 100644
--- a/src/libutil/serialise.cc
+++ b/src/libutil/serialise.cc
@@ -357,7 +357,7 @@ Sink & operator << (Sink & sink, const Error & ex)
sink
<< "Error"
<< info.level
- << info.name
+ << "Error" // removed
<< info.msg.str()
<< 0 // FIXME: info.errPos
<< info.traces.size();
@@ -426,11 +426,10 @@ Error readError(Source & source)
auto type = readString(source);
assert(type == "Error");
auto level = (Verbosity) readInt(source);
- auto name = readString(source);
+ auto name = readString(source); // removed
auto msg = readString(source);
ErrorInfo info {
.level = level,
- .name = name,
.msg = hintformat(std::move(format("%s") % msg)),
};
auto havePos = readNum<size_t>(source);