Skip to content

Commit

Permalink
Improve error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Aug 21, 2021
1 parent 04ac914 commit 8b3e06b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Exceptions/CouldntProcessValidationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CouldntProcessValidationRule extends \RuntimeException implements ScribeEx
public static function forParam(string $paramName, $rule, Throwable $innerException): CouldntProcessValidationRule
{
return new self(
"Couldn't process this validation rule for the param `$paramName`: ".var_export($rule, true),
"Couldn't process the validation rule ".var_export($rule, true)." for the param `$paramName`: {$innerException->getMessage()}",
0, $innerException
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ProblemParsingValidationRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ProblemParsingValidationRules extends \RuntimeException implements ScribeE
public static function forParam(string $paramName, Throwable $innerException): ProblemParsingValidationRules
{
return new self(
"Problem processing validation rules for the param `$paramName`",
"Problem processing validation rules for the param `$paramName`: {$innerException->getMessage()}",
0, $innerException);
}
}

0 comments on commit 8b3e06b

Please sign in to comment.