/**
  * MissingFieldsException constructor.
  *
  * @param string $class
  * @param string[] $fields
  * @param int $code
  * @param \Exception|null $previous
  */
 public function __construct($class, $fields, $code = 0, \Exception $previous = null)
 {
     if (empty($fields)) {
         parent::__construct('There are no missing fields, however there may be a bug in the DatastoreHelper code.', $code, $previous);
     } else {
         parent::__construct($class . ' is missing the following fields: ' . implode(',', $fields), $code, $previous);
     }
 }
 /**
  * EnumException constructor.
  * @param BaseEnum $enum
  * @param mixed $value
  * @param int $code
  * @param \Exception|null $previous
  */
 public function __construct($enum, $value, $code = 0, \Exception $previous = null)
 {
     parent::__construct($enum->getName() . ', `' . $value . '`, is not allowed.  Acceptable values are: `' . implode('`, `', $enum::getValues()) . '`.', $code, $previous);
 }