Only produce output if there are any errors to report

`var_dump()` outputs something even if there're not errors, so this makes it silent in non-error situations (and prints errors according to the `PlanetError::toString()`.