PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 1.1.1
JetFormBuilder — Dynamic Blocks Form Builder v1.1.1
3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 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 All 130 releases
jetformbuilder / includes / exceptions / handler-exception.php
handler-exception.php
46 lines 982 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace Jet_Form_Builder\Exceptions;
5
6
7 use Jet_Form_Builder\Dev_Mode\Logger;
8 use Jet_Form_Builder\Form_Messages\Manager;
9 use Throwable;
10
11 abstract class Handler_Exception extends \Exception {
12 protected $default_type_message = 'failed';
13 protected $dynamic_message = '';
14
15 protected $additional_data;
16
17 public function __construct( $message = "", ...$additional_data ) {
18 parent::__construct( $message, 0, null );
19
20 $this->additional_data = $additional_data;
21
22 Logger::instance()->log( $this );
23 }
24
25 public function dynamic_success() {
26 $this->message = Manager::dynamic_success( $this->message );
27
28 return $this;
29 }
30
31 public function dynamic_error() {
32 $this->message = Manager::dynamic_error( $this->message );
33
34 return $this;
35 }
36
37
38 public function get_form_status() {
39 return $this->message ? $this->message : $this->default_type_message;
40 }
41
42 public function get_additional() {
43 return $this->additional_data;
44 }
45
46 }