mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 15:32:43 +01:00
Serialize exceptions from the daemon to the client
This commit is contained in:
parent
be149acfda
commit
c43e882f54
3 changed files with 24 additions and 11 deletions
|
|
@ -925,9 +925,13 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink * sink, Source *
|
|||
}
|
||||
|
||||
else if (msg == STDERR_ERROR) {
|
||||
string error = readString(from);
|
||||
unsigned int status = readInt(from);
|
||||
return std::make_exception_ptr(Error(status, error));
|
||||
if (GET_PROTOCOL_MINOR(daemonVersion) >= 26) {
|
||||
return std::make_exception_ptr(readError(from));
|
||||
} else {
|
||||
string error = readString(from);
|
||||
unsigned int status = readInt(from);
|
||||
return std::make_exception_ptr(Error(status, error));
|
||||
}
|
||||
}
|
||||
|
||||
else if (msg == STDERR_NEXT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue