diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-06-29 17:08:09 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-06-29 17:13:43 +0200 |
commit | 2cb56aeb16db8f3b10ee8760789eb2088912294c (patch) | |
tree | bd91d7997a28179b4741f04dce3936f1eb890b72 | |
parent | d2f22123ce130270cdf9acc83b1b9afd88605ec3 (diff) | |
download | justbuild-2cb56aeb16db8f3b10ee8760789eb2088912294c.tar.gz |
Error reporting: also abbreviate the expression in the stack trace
... to the same limit as the values occuring in the stack.
-rw-r--r-- | share/man/just.1.org | 3 | ||||
-rw-r--r-- | src/buildtool/build_engine/expression/evaluator.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/share/man/just.1.org b/share/man/just.1.org index 14bd8183..7331f06b 100644 --- a/share/man/just.1.org +++ b/share/man/just.1.org @@ -341,7 +341,8 @@ well-defined graph file. See *just-graph-file(5)* for more details. *--expression-log-limit* NUM\\ In error messages, truncate the entries in the enumeration of the active - environment to the specified number of characters (default: 320).\\ + environment, as well as the expression to be evaluated, to the specified + number of characters (default: 320).\\ Supported by: analyse|build|install *-P*, *--print-to-stdout* LOGICAL_PATH\\ diff --git a/src/buildtool/build_engine/expression/evaluator.cpp b/src/buildtool/build_engine/expression/evaluator.cpp index 0097bd27..af5d46ed 100644 --- a/src/buildtool/build_engine/expression/evaluator.cpp +++ b/src/buildtool/build_engine/expression/evaluator.cpp @@ -920,7 +920,7 @@ auto Evaluator::EvaluationError::WhileEvaluating(ExpressionPtr const& expr, expr["type"]->IsString()) { ss << expr["type"]->ToString() << "-expression "; } - ss << expr->ToString() << std::endl; + ss << expr->ToAbbrevString(Config().expression_log_limit) << std::endl; ss << " environment " << std::endl; ss << env.Enumerate(" - ", Config().expression_log_limit) << std::endl; ss << ex.what(); |