mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
appending to hints; remove _printError
This commit is contained in:
parent
f30de61578
commit
7ffb5efdbc
4 changed files with 18 additions and 9 deletions
|
@ -26,10 +26,13 @@ int main()
|
|||
|
||||
// ErrorInfo constructor
|
||||
try {
|
||||
auto e = Error("generic error");
|
||||
auto e = Error("some error");
|
||||
throw DemoError(e.info());
|
||||
} catch (Error &e) {
|
||||
logger->logEI(e.info());
|
||||
ErrorInfo ei = e.info();
|
||||
string prevhint = (e.info().hint.has_value() ? e.info().hint->str() : "");
|
||||
ei.hint = std::optional(hintfmt("previous hint was: %s", normaltxt(prevhint)));
|
||||
logger->logEI(ei);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue