Remove no longer used exception

[MAILPOET-4946]
This commit is contained in:
Jan Jakes
2023-03-31 13:37:35 +02:00
committed by Aschepikov
parent abe44ca9f8
commit 0157feb508

View File

@ -9,7 +9,6 @@ use MailPoet\Automation\Engine\Exceptions\UnexpectedValueException;
use MailPoet\Automation\Engine\Utils\Json;
class Exceptions {
private const MIGRATION_FAILED = 'mailpoet_automation_migration_failed';
private const DATABASE_ERROR = 'mailpoet_automation_database_error';
private const JSON_NOT_OBJECT = 'mailpoet_automation_json_not_object';
private const AUTOMATION_NOT_FOUND = 'mailpoet_automation_not_found';
@ -43,13 +42,6 @@ class Exceptions {
);
}
public static function migrationFailed(string $error): InvalidStateException {
return InvalidStateException::create()
->withErrorCode(self::MIGRATION_FAILED)
// translators: %s is the error message.
->withMessage(sprintf(__('Migration failed: %s', 'mailpoet'), $error));
}
public static function databaseError(string $error): InvalidStateException {
return InvalidStateException::create()
->withErrorCode(self::DATABASE_ERROR)