Skip to content

Commit

Permalink
Move exception strings to Language/
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Jul 2, 2019
1 parent 26f8628 commit 8ee5317
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Exceptions/AlertsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ class AlertsException extends FrameworkException implements ExceptionInterface
{
public static function forInvalidTemplate(string $template = null)
{
return new static("'{$template}' is not a valid Alerts template.");
return new static(lang('Alerts.invalidTemplate', [$template]));
}
public static function forMissingTemplateView(string $template = null)
{
return new static("Could not find template view file: '{$template}'.");
return new static(lang('Alerts.missingTemplateView', [$template]));
}
}
6 changes: 6 additions & 0 deletions src/Language/en/Alerts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

return [
'invalidTemplate' => '"{0}" is not a valid Alerts template.',
'missingTemplateView' => 'Could not find template view file: "{0}".',
];

0 comments on commit 8ee5317

Please sign in to comment.