aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@protonmail.com>2022-04-29 10:51:10 -0600
committerBen Burdette <bburdette@protonmail.com>2022-04-29 10:51:10 -0600
commitca6cba8b81502450f8e377112ce11303ccedc760 (patch)
tree3abc36b3a518dfcf6c975625295d5bd53ee207f3 /src/libexpr/eval.cc
parent2a5632c70dcb686a7764c23a5f330fcb9a33c8a1 (diff)
fix 'suggestions' error
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 7058d117f..294168392 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -866,7 +866,7 @@ void EvalState::throwEvalError(const char * s, const std::string & s2) const
void EvalState::throwEvalError(const PosIdx pos, const Suggestions & suggestions, const char * s,
const std::string & s2, Env & env, Expr &expr) const
{
- auto error = EvalError({
+ auto error = EvalError(ErrorInfo{
.msg = hintfmt(s, s2),
.errPos = positions[pos],
.suggestions = suggestions,
@@ -944,32 +944,6 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::stri
throw error;
}
-/*
-LocalNoInlineNoReturn(void throwEvalError(const Pos & pos, const char * s, const std::string & s2, const std::string & s3, EvalState &evalState))
-{
- auto error = EvalError({
- .msg = hintfmt(s, s2, s3),
- .errPos = positions[pos]
- });
-
- evalState.debugLastTrace(error);
-
- throw error;
-}
-
-LocalNoInlineNoReturn(void throwEvalError(const char * s, const std::string & s2, const std::string & s3, EvalState &evalState))
-{
- auto error = EvalError({
- .msg = hintfmt(s, s2, s3),
- .errPos = noPos
- });
-
- evalState.debugLastTrace(error);
-
- throw error;
-}
-*/
-
void EvalState::throwEvalError(const PosIdx p1, const char * s, const Symbol sym, const PosIdx p2, Env & env, Expr &expr) const
{
// p1 is where the error occurred; p2 is a position mentioned in the message.