first commit
This commit is contained in:
16
wp-content/plugins/brizy/editor/exceptions/exception.php
Normal file
16
wp-content/plugins/brizy/editor/exceptions/exception.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
class Brizy_Editor_Exceptions_Exception extends Exception implements Serializable {
|
||||
protected $code = 500;
|
||||
protected $message = 'Internal server error';
|
||||
|
||||
public function serialize() {
|
||||
return serialize( [ 'code' => $this->getCode(), 'message' => $this->getMessage() ] );
|
||||
}
|
||||
|
||||
public function unserialize( $serialized ) {
|
||||
$data = $this->unserialize( $serialized );
|
||||
$this->code = $data['code'];
|
||||
$this->message = $data['message'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user