term.go: Error messagge about incompatible types now truncates long values
This commit is contained in:
parent
1c4ffd7d64
commit
6bb891e09d
13
term.go
13
term.go
@ -162,17 +162,14 @@ func (self *term) toInt(computedValue any, valueDescription string) (i int, err
|
||||
|
||||
func (self *term) errIncompatibleTypes(leftValue, rightValue any) error {
|
||||
leftType := getTypeName(leftValue)
|
||||
leftText := getFormatted(leftValue, Truncate)
|
||||
rightType := getTypeName(rightValue)
|
||||
rightText := getFormatted(rightValue, Truncate)
|
||||
return self.tk.Errorf(
|
||||
"left operand '%v' [%s] and right operand '%v' [%s] are not compatible with operator %q",
|
||||
leftValue, leftType,
|
||||
rightValue, rightType,
|
||||
"left operand '%s' [%s] and right operand '%s' [%s] are not compatible with operator %q",
|
||||
leftText, leftType,
|
||||
rightText, rightType,
|
||||
self.source())
|
||||
// return self.tk.Errorf(
|
||||
// "left operand '%v' [%T] and right operand '%v' [%T] are not compatible with operator %q",
|
||||
// leftValue, leftValue,
|
||||
// rightValue, rightValue,
|
||||
// self.source())
|
||||
}
|
||||
|
||||
func (self *term) errIncompatibleType(value any) error {
|
||||
|
Loading…
Reference in New Issue
Block a user