| @@ 16-33 (lines=18) @@ | ||
| 13 | * @author Brent Christensen | |
| 14 | * @since $VID:$ | |
| 15 | */ | |
| 16 | class InvalidSessionDataException extends \Exception { | |
| 17 | ||
| 18 | /** | |
| 19 | * InvalidInterfaceException constructor. | |
| 20 | * | |
| 21 | * @param string $message | |
| 22 | * @param int $code | |
| 23 | * @param \Exception $previous | |
| 24 | */ | |
| 25 | 	public function __construct( $message = '', $code = 0, \Exception $previous = null ) { | |
| 26 | 		if ( empty( $message ) ) { | |
| 27 | $message = esc_html__( 'The session data is either missing or invalid.', 'event_espresso' ); | |
| 28 | } | |
| 29 | parent::__construct( $message, $code, $previous ); | |
| 30 | } | |
| 31 | ||
| 32 | ||
| 33 | } | |
| 34 | // End of file InvalidSessionDataException.php | |
| 35 | // Location: EventEspresso\core\exceptions\InvalidSessionDataException.php | |
| @@ 18-43 (lines=26) @@ | ||
| 15 | * @author Brent Christensen | |
| 16 | * @since $VID:$ | |
| 17 | */ | |
| 18 | class ServiceNotFoundException extends \RuntimeException | |
| 19 | { | |
| 20 | ||
| 21 | /** | |
| 22 | * ServiceNotFoundException constructor | |
| 23 | * | |
| 24 | * @param string $service_name the name of the requested service | |
| 25 | * @param string $message | |
| 26 | * @param int $code | |
| 27 | * @param \Exception $previous | |
| 28 | */ | |
| 29 | public function __construct( | |
| 30 | $service_name, | |
| 31 | $message = '', | |
| 32 | $code = 0, | |
| 33 | \Exception $previous = null | |
| 34 |     ) { | |
| 35 |         if (empty($message)) { | |
| 36 | $message = sprintf( | |
| 37 |                 __('The requested service "%1$s" could not found be found in the CoffeeShop.', 'event_espresso'), | |
| 38 | $service_name | |
| 39 | ); | |
| 40 | } | |
| 41 | parent::__construct($message, $code, $previous); | |
| 42 | } | |
| 43 | } | |
| 44 | // End of file ServiceNotFoundException.php | |
| 45 | // Location: /ServiceNotFoundException.php | |
| @@ 9-33 (lines=25) @@ | ||
| 6 | use InvalidArgumentException; | |
| 7 | ||
| 8 | ||
| 9 | class InvalidStatusException extends InvalidArgumentException | |
| 10 | { | |
| 11 | /** | |
| 12 | * InvalidStatusException constructor. | |
| 13 | * @param string $status the invalid status id that was supplied | |
| 14 | * @param string $domain the name of the domain, model, or class that the status belongs to | |
| 15 | * @param string $message custom message | |
| 16 | * @param int $code | |
| 17 | * @param Exception|null $previous | |
| 18 | */ | |
| 19 | public function __construct($status, $domain, $message = '', $code = 0, Exception $previous = null) | |
| 20 |     { | |
| 21 |         if (empty($message)) { | |
| 22 | $message = sprintf( | |
| 23 | __( | |
| 24 | '"%1$s" is not a valid %2$s status', | |
| 25 | 'event_espresso' | |
| 26 | ), | |
| 27 | $status, | |
| 28 | $domain | |
| 29 | ); | |
| 30 | } | |
| 31 | parent::__construct($message, $code, $previous); | |
| 32 | } | |
| 33 | } | |
| 34 | ||