Skip to content

Commit 8402b8d

Browse files
committed
Prefix Config errors with "ERROR: "
1 parent 103f57b commit 8402b8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Scripts/DocCodeExamples/Config.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function __construct(Writer $writer)
147147
public function getProperty(string $propertyName)
148148
{
149149
if (isset($this->{$propertyName}) === false) {
150-
throw new \RuntimeException(sprintf('Property "%s" does not exist', $propertyName));
150+
throw new \RuntimeException(sprintf('ERROR: Property "%s" does not exist', $propertyName));
151151
}
152152

153153
return $this->{$propertyName};
@@ -198,7 +198,7 @@ private function processCliCommand()
198198

199199
foreach ($args as $arg) {
200200
if (\strpos($arg, '-') === 0 && $this->isUnsupportedNamedArgument($arg) === true) {
201-
throw new \RuntimeException("Unsupported argument $arg");
201+
throw new \RuntimeException("ERROR: Unsupported argument $arg");
202202
}
203203

204204
if (\strpos($arg, '--exclude=') === 0) {
@@ -301,7 +301,7 @@ protected function processTargetPathArgument(string $arg): string
301301
$realpath = \realpath($arg);
302302

303303
if ($realpath === false) {
304-
throw new \RuntimeException(\sprintf('Target path %s does not exist', $arg));
304+
throw new \RuntimeException(\sprintf('ERROR: Target path %s does not exist', $arg));
305305
}
306306

307307
return Helper::normalizePath($realpath);

0 commit comments

Comments
 (0)