Skip to content

Commit c4a1c62

Browse files
committed
fix error handling
1 parent 9777630 commit c4a1c62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PHPCR/Util/Console/Helper/TreeDumper/ConsoleDumperPropertyVisitor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct(OutputInterface $output, $options = array())
7373
public function visit(ItemInterface $item)
7474
{
7575
if (! $item instanceof PropertyInterface) {
76-
throw new \Exception("Internal error: did not expect to visit a non-node object: $item");
76+
throw new \Exception(sprintf('Internal error: did not expect to visit a non-property object: %s', is_object($item) ? get_class($item) : $item));
7777
}
7878

7979
$value = $item->getString();
@@ -89,7 +89,7 @@ public function visit(ItemInterface $item)
8989
$referrers = array();
9090

9191
if (in_array($item->getType(), array(
92-
PropertyType::WEAKREFERENCE,
92+
PropertyType::WEAKREFERENCE,
9393
PropertyType::REFERENCE
9494
))) {
9595
$referenceStrings = array();

0 commit comments

Comments
 (0)