It is not a `RuntimeException` but a `InvalidArgumentException`. May be you can add the class name  of $object to the message. It will ease debuging.