Merge change I237c1cee into eclair-mr2

* changes:
  Improve exception message thrown when a View's state is of the wrong type.