diff --git a/fin_defs/__init__.py b/fin_defs/__init__.py index b6f9e42..6f8286e 100644 --- a/fin_defs/__init__.py +++ b/fin_defs/__init__.py @@ -574,7 +574,7 @@ class AssetAmount: def __truediv__(self, other: 'Decimal | AssetAmount') -> 'Decimal | AssetAmount': if isinstance(other, AssetAmount): if self.asset != other.asset: - msg = f'AssetAmount must have same asset, but: {self.asset} != {other.asset}' + msg = f'Attempting to divide {self} by {other}, but these must have the same asset' raise ValueError(msg) return self.amount / other.amount return AssetAmount(self.asset, self.amount / other)