optimizations
This commit is contained in:
@@ -11,7 +11,7 @@ type BinaryOpError struct {
|
||||
}
|
||||
|
||||
func (e BinaryOpError) Error() string {
|
||||
return fmt.Sprintf("unsupported types for binary operation: %s %s %s %s %s", e.left.Type(), e.left.Inspect(), e.op, e.right.Type(), e.right.Inspect())
|
||||
return fmt.Sprintf("unsupported operator: %s %s %s", e.left.Type(), e.op, e.right.Type())
|
||||
}
|
||||
|
||||
// NewBinaryOpError returns a new BinaryOpError
|
||||
@@ -25,7 +25,7 @@ type DivisionByZeroError struct {
|
||||
}
|
||||
|
||||
func (e DivisionByZeroError) Error() string {
|
||||
return fmt.Sprintf("cannot divide %s by zero", e.left)
|
||||
return fmt.Sprintf("division by zero: %s", e.left)
|
||||
}
|
||||
|
||||
// NewDivisionByZeroError returns a new DivisionByZeroError
|
||||
|
||||
Reference in New Issue
Block a user