action-exception.php
2 years ago
condition-exception.php
2 years ago
condition-silence-exception.php
2 years ago
gateway-exception.php
2 years ago
handler-exception.php
2 years ago
integration-exception.php
2 years ago
invalid-macro-exception.php
2 years ago
not-router-request.php
2 years ago
parse-exception.php
2 years ago
plain-default-exception.php
2 years ago
preset-exception.php
2 years ago
query-builder-exception.php
2 years ago
repository-exception.php
2 years ago
request-exception.php
2 years ago
silence-exception.php
2 years ago
request-exception.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Exceptions; |
| 5 | |
| 6 | // If this file is called directly, abort. |
| 7 | if ( ! defined( 'WPINC' ) ) { |
| 8 | die; |
| 9 | } |
| 10 | |
| 11 | class Request_Exception extends Handler_Exception { |
| 12 | |
| 13 | private $errors; |
| 14 | |
| 15 | public function __construct( $message = '', ...$errors ) { |
| 16 | $this->errors = isset( $errors[0] ) ? $errors[0] : false; |
| 17 | |
| 18 | parent::__construct( $message, ...$errors ); |
| 19 | } |
| 20 | |
| 21 | public function get_fields_errors() { |
| 22 | return $this->errors; |
| 23 | } |
| 24 | |
| 25 | |
| 26 | |
| 27 | } |
| 28 |