Add static factory class for easier exception creation
[MAILPOET-4135]
This commit is contained in:
13
mailpoet/lib/Automation/Exceptions.php
Normal file
13
mailpoet/lib/Automation/Exceptions.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php declare(strict_types = 1);
|
||||
|
||||
namespace MailPoet\Automation;
|
||||
|
||||
use MailPoet\Automation\Exceptions\InvalidStateException;
|
||||
|
||||
class Exceptions {
|
||||
public function __construct() {
|
||||
throw new InvalidStateException(
|
||||
"This is a static factory class. Use it via 'Exception::someError()' factories."
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user