diff options
author | fsantini <francesco.santini@gmail.com> | 2018-02-16 19:27:50 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-02-16 19:27:50 +0300 |
commit | ac904b273182506892f57cc9a08312550e24d80c (patch) | |
tree | 940346ae9b479336012900f00ea83149c506fbb1 /xs/src/libslic3r/PlaceholderParser.cpp | |
parent | 8dd5fe83fcad2f46aedb1da29747c820a58ddb79 (diff) |
Error messages in parsing variables (#722)
Making error messages more clear when a vector or scalar is found in macro parsing, and the other type is expected.
Diffstat (limited to 'xs/src/libslic3r/PlaceholderParser.cpp')
-rw-r--r-- | xs/src/libslic3r/PlaceholderParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xs/src/libslic3r/PlaceholderParser.cpp b/xs/src/libslic3r/PlaceholderParser.cpp index ba0efd6e4..62b516935 100644 --- a/xs/src/libslic3r/PlaceholderParser.cpp +++ b/xs/src/libslic3r/PlaceholderParser.cpp @@ -623,7 +623,7 @@ namespace client expr<Iterator> &output) { if (opt.opt->is_vector()) - ctx->throw_exception("Referencing a scalar variable in a vector context", opt.it_range); + ctx->throw_exception("Referencing a vector variable when scalar is expected", opt.it_range); switch (opt.opt->type()) { case coFloat: output.set_d(opt.opt->getFloat()); break; case coInt: output.set_i(opt.opt->getInt()); break; @@ -648,7 +648,7 @@ namespace client expr<Iterator> &output) { if (opt.opt->is_scalar()) - ctx->throw_exception("Referencing a vector variable in a scalar context", opt.it_range); + ctx->throw_exception("Referencing a scalar variable when vector is expected", opt.it_range); const ConfigOptionVectorBase *vec = static_cast<const ConfigOptionVectorBase*>(opt.opt); if (vec->empty()) ctx->throw_exception("Indexing an empty vector variable", opt.it_range); |