aboutsummaryrefslogtreecommitdiff
path: root/src/libmain/shared.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-06-19 13:44:08 -0600
committerBen Burdette <bburdette@gmail.com>2020-06-19 13:44:08 -0600
commit54e8f550c9d5cc88c1161035d366871bb82d4a0c (patch)
treedbd84d78a0a0d7e2b107561487b6d7e033174687 /src/libmain/shared.cc
parent4d1a4f02178b1f77a4bcf2de0483500d89c1424c (diff)
addErrorTrace
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r--src/libmain/shared.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 1cb422967..27a4d5fc1 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -323,11 +323,13 @@ int handleExceptions(const string & programName, std::function<void()> fun)
printError("Try '%1% --help' for more information.", programName);
return 1;
} catch (BaseError & e) {
- if (settings.showTrace && e.prefix() != "")
- printError(e.prefix());
+ // TODO showTrace as argument, or have calcWhat check settings?
+ // if (settings.showTrace && e.prefix() != "")
+ // printError(e.prefix());
logError(e.info());
- if (e.prefix() != "" && !settings.showTrace)
- printError("(use '--show-trace' to show detailed location information)");
+ // TODO fix to detect non-empty trace here.
+ // if (e.prefix() != "" && !settings.showTrace)
+ // printError("(use '--show-trace' to show detailed location information)");
return e.status;
} catch (std::bad_alloc & e) {
printError(error + "out of memory");