Skip to content

Commit

Permalink
Update the additional data to private property
Browse files Browse the repository at this point in the history
  • Loading branch information
hsingyuc committed Dec 15, 2023
1 parent 859d908 commit d7cf091
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion includes/exceptions/class-base-exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ abstract class Base_Exception extends Exception {
*
* @var array
*/
public $additional_data = [];
private $additional_data = [];

/**
* Constructor, including the usual $message, $code, and $previous,
Expand Down Expand Up @@ -56,6 +56,15 @@ public function get_error_code() {
return $this->error_code;
}

/**
* Returns the error code.
*
* @return string Error code, for example 'order_not_found'.
*/
public function getErrorCode() {
return $this->error_code;
}

/**
* Returns additional error data.
*
Expand Down

0 comments on commit d7cf091

Please sign in to comment.