diff --git a/Civi/Twingle/Exceptions/BaseException.php b/Civi/Twingle/Exceptions/BaseException.php index 57e4660..f1ce9e3 100644 --- a/Civi/Twingle/Exceptions/BaseException.php +++ b/Civi/Twingle/Exceptions/BaseException.php @@ -1,4 +1,21 @@ . + */ + +declare(strict_types = 1); namespace Civi\Twingle\Exceptions; diff --git a/Civi/Twingle/Exceptions/BaseException.php~refs/remotes/origin/master b/Civi/Twingle/Exceptions/BaseException.php~refs/remotes/origin/master deleted file mode 100644 index a5413d5..0000000 --- a/Civi/Twingle/Exceptions/BaseException.php~refs/remotes/origin/master +++ /dev/null @@ -1,67 +0,0 @@ -. - */ - -declare(strict_types = 1); - -namespace Civi\Twingle\Exceptions; - -use CRM_Twingle_ExtensionUtil as E; - -/** - * A simple custom exception class that indicates a problem within a class - * of the Twingle API extension. - */ -class BaseException extends \Exception { - - /** - * @var string - */ - protected $code; - protected string $log_message; - - /** - * BaseException Constructor - * @param string $message - * Error message - * @param string $error_code - * A meaningful error code - * @param \Throwable $previous - * A previously thrown exception to include. - */ - public function __construct(string $message = '', string $error_code = '', \Throwable $previous = NULL) { - parent::__construct($message, 1, $previous); - $this->log_message = '' !== $message ? E::LONG_NAME . ': ' . $message : ''; - $this->code = $error_code; - } - - /** - * Returns the error message, but with the extension name prefixed. - * @return string - */ - public function getLogMessage() { - return $this->log_message; - } - - /** - * Returns the error code. - * @return string - */ - public function getErrorCode() { - return $this->code; - } - -} diff --git a/Civi/Twingle/Exceptions/ProfileException.php~refs/remotes/origin/master b/Civi/Twingle/Exceptions/ProfileException.php similarity index 100% rename from Civi/Twingle/Exceptions/ProfileException.php~refs/remotes/origin/master rename to Civi/Twingle/Exceptions/ProfileException.php diff --git a/Civi/Twingle/Exceptions/ProfileException.php~implement TwingleShop integration b/Civi/Twingle/Exceptions/ProfileException.php~implement TwingleShop integration deleted file mode 100644 index b9e5954..0000000 --- a/Civi/Twingle/Exceptions/ProfileException.php~implement TwingleShop integration +++ /dev/null @@ -1,18 +0,0 @@ -affected_field_name = $affected_field_name; } diff --git a/Civi/Twingle/Exceptions/ProfileValidationError.php~implement TwingleShop integration b/Civi/Twingle/Exceptions/ProfileValidationError.php~implement TwingleShop integration deleted file mode 100644 index a678ba7..0000000 --- a/Civi/Twingle/Exceptions/ProfileValidationError.php~implement TwingleShop integration +++ /dev/null @@ -1,37 +0,0 @@ -affected_field_name = $affected_field_name; - } - - /** - * Returns the name of the profile field that caused the exception. - * @return string - */ - public function getAffectedFieldName() { - return $this->affected_field_name; - } - -}