mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
Put the --show-trace hint in the logical place
This commit is contained in:
parent
c548e35498
commit
d33d15a48b
2 changed files with 1 additions and 3 deletions
|
@ -403,8 +403,6 @@ int handleExceptions(const std::string & programName, std::function<void()> fun)
|
||||||
return 1;
|
return 1;
|
||||||
} catch (BaseError & e) {
|
} catch (BaseError & e) {
|
||||||
logError(e.info());
|
logError(e.info());
|
||||||
if (e.hasTrace() && !loggerSettings.showTrace.get())
|
|
||||||
printError("(use '--show-trace' to show detailed location information)");
|
|
||||||
return e.status;
|
return e.status;
|
||||||
} catch (std::bad_alloc & e) {
|
} catch (std::bad_alloc & e) {
|
||||||
printError(error + "out of memory");
|
printError(error + "out of memory");
|
||||||
|
|
|
@ -303,7 +303,7 @@ std::ostream & showErrorInfo(std::ostream & out, const ErrorInfo & einfo, bool s
|
||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
for (const auto & trace : einfo.traces) {
|
for (const auto & trace : einfo.traces) {
|
||||||
if (!showTrace && count > 3) {
|
if (!showTrace && count > 3) {
|
||||||
oss << "\n" << ANSI_ITALIC "(stack trace truncated)" ANSI_NORMAL << "\n";
|
oss << "\n" << ANSI_WARNING "(stack trace truncated; use '--show-trace' to show the full trace)" ANSI_NORMAL << "\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue