Skip to content

Commit

Permalink
Merge pull request #149 from alps-asd/shorter-message
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Jan 7, 2022
2 parents 2dbdb4e + 3746292 commit 01de756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/JsonDecode.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ private function getJsonErrorMsg(string $json): ParsingException

assert($result instanceof ParsingException);

return new ParsingException('"' . $json . '" does not contain valid JSON' . "\n" . $result->getMessage(), $result->getDetails());
return new ParsingException($result->getMessage(), $result->getDetails());
}
}
2 changes: 1 addition & 1 deletion tests/ErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ErrorTest extends TestCase
public function testInvalidJson(): void
{
$this->expectException(ParsingException::class);
$this->expectErrorMessage('" does not contain valid JSON');
$this->expectErrorMessage('Expected one of:');
new Profile(__DIR__ . '/Fake/invalid.json', new LabelName());
}

Expand Down

0 comments on commit 01de756

Please sign in to comment.