filp/whoops · error · RuntimeException

Could not find resource '$resource' in any resource paths.(s

Error message

Could not find resource '$resource' in any resource paths.(searched: join(", ", $this->searchPaths))

What it means

Error "Could not find resource '$resource' in any resource paths.(searched: join(", ", $this->searchPaths))" thrown in filp/whoops.

Source

Thrown at src/Whoops/Handler/PrettyPageHandler.php:715

        // by caching its absolute, resolved path:
        if (isset($this->resourceCache[$resource])) {
            return $this->resourceCache[$resource];
        }

        // Search through available search paths, until we find the
        // resource we're after:
        foreach ($this->searchPaths as $path) {
            $fullPath = $path . "/$resource";

            if (is_file($fullPath)) {
                // Cache the result:
                $this->resourceCache[$resource] = $fullPath;
                return $fullPath;
            }
        }

        // If we got this far, nothing was found.
        throw new RuntimeException(
            "Could not find resource '$resource' in any resource paths."
            . "(searched: " . join(", ", $this->searchPaths). ")"
        );
    }

    /**
     * @deprecated
     *
     * @return string
     */
    public function getResourcesPath()
    {
        $allPaths = $this->getResourcePaths();

        // Compat: return only the first path added
        return end($allPaths) ?: null;
    }

View on GitHub (pinned to fa1bc9c95a)

When it happens

Trigger: Thrown at src/Whoops/Handler/PrettyPageHandler.php:715 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of filp/whoops@fa1bc9c95a (2026-08-21). Data as JSON: /api/errors/182d69f2f52af70c. Report an issue: GitHub.