Skip to content

Commit 44d9e14

Browse files
authored
Merge pull request #759 from hydephp/update-FileNotFoundException
Wrap the file path in brackets for the FileNotFoundException
2 parents ed57dac + ad30de7 commit 44d9e14

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/framework/src/Framework/Exceptions/FileNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class FileNotFoundException extends Exception
1616

1717
public function __construct(?string $path = null, ?string $message = null)
1818
{
19-
$this->message = $message ?? ($path ? "File $path not found." : $this->message);
19+
$this->message = $message ?? ($path ? "File [$path] not found." : $this->message);
2020

2121
parent::__construct($this->message, $this->code);
2222
}

packages/framework/tests/Feature/Actions/AnonymousViewCompilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testCanCompileBladeFileWithData()
3030
public function testWithMissingView()
3131
{
3232
$this->expectException(FileNotFoundException::class);
33-
$this->expectExceptionMessage('File foo.blade.php not found.');
33+
$this->expectExceptionMessage('File [foo.blade.php] not found.');
3434

3535
AnonymousViewCompiler::call('foo.blade.php');
3636
}

0 commit comments

Comments
 (0)