Skip to content

Commit 05ce39a

Browse files
authored
Improve exception message (#3)
1 parent 15e89db commit 05ce39a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/Version/Installed.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,13 @@ private function getVersionFromConsoleCommand(): ?string
8181
try {
8282
$output = $this->process->exec([$this->executablePath, '--version']);
8383
} catch (ProcessFailedException) {
84-
throw new RoadrunnerNotInstalledException('Roadrunner is not installed.');
84+
throw new RoadrunnerNotInstalledException(\sprintf(
85+
'Roadrunner is not installed. Make sure RoadRunner is installed and available here: `%s`.' .
86+
' If RoadRunner is installed in a different path, pass the correct `executablePath` parameter to the' .
87+
' `%s` class constructor.',
88+
$this->executablePath,
89+
self::class
90+
));
8591
}
8692

8793
\preg_match('/\bversion (\d+\.\d+\.\d+[\w.-]*)/', $output, $matches);

0 commit comments

Comments
 (0)