Skip to content

Commit 3800a90

Browse files
authored
Merge pull request #4 from atfromhome/add-exeption
Tambah exception
2 parents 0966c58 + dc89cb8 commit 3800a90

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace FromHome\ModelUpload\Exceptions;
6+
7+
final class CannotProcessRecord extends ModelRecordProcessorException
8+
{
9+
public static function make(string $reason): ModelRecordProcessorException
10+
{
11+
return new self(
12+
'Cannot process record : '.$reason,
13+
);
14+
}
15+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace FromHome\ModelUpload\Exceptions;
4+
5+
use Exception;
6+
7+
abstract class ModelRecordProcessorException extends Exception
8+
{
9+
abstract public static function make(string $reason): self;
10+
}

0 commit comments

Comments
 (0)