From 58d50737702adc48604f0a709080dcc587d7145f Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Wed, 19 Apr 2023 13:47:09 +0100 Subject: Fixes internal error messages for arithmetic functions --- subex/arithmetic.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'subex') diff --git a/subex/arithmetic.go b/subex/arithmetic.go index 5497a68..ff30a58 100644 --- a/subex/arithmetic.go +++ b/subex/arithmetic.go @@ -73,10 +73,10 @@ func multiplyValues(atoms []walk.Atom) ([]walk.Atom, error) { if err == nil { product *= num } else { - return nil, errors.New("Tried to sum non-castable string") + return nil, errors.New("Tried to multiply non-castable string") } default: - return nil, errors.New("Tried to sum non-number") + return nil, errors.New("Tried to multiply non-number") } } if allBools { @@ -110,10 +110,10 @@ func negateValues(atoms []walk.Atom) ([]walk.Atom, error) { if err == nil { negatedNumbers = append(negatedNumbers, walk.ValueNumber(-num)) } else { - return nil, errors.New("Tried to sum non-castable string") + return nil, errors.New("Tried to negate non-castable string") } default: - return nil, errors.New("Tried to sum non-number") + return nil, errors.New("Tried to negate non-number") } } return negatedNumbers, nil -- cgit v1.2.3