diff --git a/source/Parser.php b/source/Parser.php index 33e4814..025e302 100644 --- a/source/Parser.php +++ b/source/Parser.php @@ -358,7 +358,8 @@ public function format($code) try { $parsed = $parser->parse($code); } catch (Exception $e) { - throw new Exception("could not parse code"); + // can't format, but we can still return... + return $code; } return $this->printer->prettyPrintFile($parsed);