/** * Creates a new Role object. * * @param string $type * @throws \Khill\Lavacharts\Exceptions\InvalidColumnRole */ public function __construct($type) { if (in_array($type, $this->validRoles) === false) { throw new InvalidColumnRole($type); } parent::__construct($type); }
public function __construct($value) { try { parent::__construct($value); } catch (\Exception $e) { throw new InvalidLabel($value); } }