PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 2.0.5
JetFormBuilder — Dynamic Blocks Form Builder v2.0.5
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / exceptions / handler-exception.php
jetformbuilder / includes / exceptions Last commit date
action-exception.php 4 years ago condition-exception.php 4 years ago condition-silence-exception.php 4 years ago gateway-exception.php 4 years ago handler-exception.php 4 years ago integration-exception.php 4 years ago not-router-request.php 4 years ago parse-exception.php 4 years ago plain-default-exception.php 4 years ago preset-exception.php 4 years ago query-builder-exception.php 4 years ago repository-exception.php 4 years ago request-exception.php 4 years ago silence-exception.php 4 years ago
handler-exception.php
57 lines
1 <?php
2
3
4 namespace Jet_Form_Builder\Exceptions;
5
6 use Jet_Form_Builder\Dev_Mode\Logger;
7 use Jet_Form_Builder\Form_Messages\Manager;
8
9 abstract class Handler_Exception extends \Exception {
10
11 protected $default_type_message = 'failed';
12
13 protected $additional_data;
14
15 public function __construct( $message = '', ...$additional_data ) {
16 parent::__construct( $message, 0, null );
17
18 $this->additional_data = $additional_data;
19
20 if ( $this->save_exception() ) {
21 Logger::instance()->log( $this );
22 }
23 }
24
25 public function save_exception(): bool {
26 return true;
27 }
28
29 public function set_code( $code ) {
30 $this->code = $code;
31
32 return $this;
33 }
34
35 public function dynamic_success(): Handler_Exception {
36 $this->message = Manager::dynamic_success( $this->message );
37
38 return $this;
39 }
40
41 public function dynamic_error(): Handler_Exception {
42 $this->message = Manager::dynamic_error( $this->message );
43
44 return $this;
45 }
46
47
48 public function get_form_status() {
49 return $this->message ? $this->message : $this->default_type_message;
50 }
51
52 public function get_additional() {
53 return $this->additional_data;
54 }
55
56 }
57