Skip to content

Commit 8eb6ae8

Browse files
[10.x] Make Vite throw a new ManifestNotFoundException (#47681)
* refactor: introduce a new `ManifestNotFoundException` for Vite * rename file --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 81bf9e7 commit 8eb6ae8

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/Illuminate/Foundation/Vite.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,15 +673,15 @@ protected function assetPath($path, $secure = null)
673673
* @param string $buildDirectory
674674
* @return array
675675
*
676-
* @throws \Exception
676+
* @throws \Illuminate\Foundation\ViteManifestNotFoundException
677677
*/
678678
protected function manifest($buildDirectory)
679679
{
680680
$path = $this->manifestPath($buildDirectory);
681681

682682
if (! isset(static::$manifests[$path])) {
683683
if (! is_file($path)) {
684-
throw new Exception("Vite manifest not found at: {$path}");
684+
throw new ViteManifestNotFoundException("Vite manifest not found at: $path");
685685
}
686686

687687
static::$manifests[$path] = json_decode(file_get_contents($path), true);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Illuminate\Foundation;
4+
5+
use Exception;
6+
7+
class ViteManifestNotFoundException extends Exception
8+
{
9+
//
10+
}

0 commit comments

Comments
 (0)