Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| Data_Type_Exception | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * Jetpack CRM Automation data type exception. |
| 4 | * |
| 5 | * @package automattic/jetpack-crm |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\Jetpack\CRM\Automation; |
| 9 | |
| 10 | /** |
| 11 | * Adds a Data_Type specific exception. |
| 12 | * |
| 13 | * @since 6.2.0 |
| 14 | */ |
| 15 | class Data_Type_Exception extends \Exception { |
| 16 | |
| 17 | /** |
| 18 | * Error code for when the class doesn't exist. |
| 19 | * |
| 20 | * @since 6.2.0 |
| 21 | * |
| 22 | * @var int |
| 23 | */ |
| 24 | const CLASS_NOT_FOUND = 10; |
| 25 | |
| 26 | /** |
| 27 | * Error code for when a transformer is passed, but doesn't extend the base class. |
| 28 | * |
| 29 | * @since 6.2.0 |
| 30 | * |
| 31 | * @var int |
| 32 | */ |
| 33 | const DO_NOT_EXTEND_BASE = 11; |
| 34 | |
| 35 | /** |
| 36 | * Error code for when a slug is already being used. |
| 37 | * |
| 38 | * @since 6.2.0 |
| 39 | * |
| 40 | * @var int |
| 41 | */ |
| 42 | const SLUG_EXISTS = 12; |
| 43 | |
| 44 | /** |
| 45 | * Error code for when a workflow tries to call a data type that doesn't exist. |
| 46 | * |
| 47 | * @since 6.2.0 |
| 48 | * |
| 49 | * @var int |
| 50 | */ |
| 51 | const SLUG_DO_NOT_EXIST = 13; |
| 52 | |
| 53 | /** |
| 54 | * Error code for when the passed data do not match expected format/type. |
| 55 | * |
| 56 | * @since 6.2.0 |
| 57 | * |
| 58 | * @var int |
| 59 | */ |
| 60 | const INVALID_DATA = 20; |
| 61 | } |