1*1c6adce8SGreg Roach<?php 2*1c6adce8SGreg Roach 3*1c6adce8SGreg Roach/** 4*1c6adce8SGreg Roach * webtrees: online genealogy 5*1c6adce8SGreg Roach * Copyright (C) 2021 webtrees development team 6*1c6adce8SGreg Roach * This program is free software: you can redistribute it and/or modify 7*1c6adce8SGreg Roach * it under the terms of the GNU General Public License as published by 8*1c6adce8SGreg Roach * the Free Software Foundation, either version 3 of the License, or 9*1c6adce8SGreg Roach * (at your option) any later version. 10*1c6adce8SGreg Roach * This program is distributed in the hope that it will be useful, 11*1c6adce8SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*1c6adce8SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*1c6adce8SGreg Roach * GNU General Public License for more details. 14*1c6adce8SGreg Roach * You should have received a copy of the GNU General Public License 15*1c6adce8SGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 16*1c6adce8SGreg Roach */ 17*1c6adce8SGreg Roach 18*1c6adce8SGreg Roachdeclare(strict_types=1); 19*1c6adce8SGreg Roach 20*1c6adce8SGreg Roachnamespace Fisharebest\Webtrees\Exceptions; 21*1c6adce8SGreg Roach 22*1c6adce8SGreg Roachuse DomainException; 23*1c6adce8SGreg Roachuse Exception; 24*1c6adce8SGreg Roachuse Fisharebest\Webtrees\I18N; 25*1c6adce8SGreg Roach 26*1c6adce8SGreg Roachuse function e; 27*1c6adce8SGreg Roach 28*1c6adce8SGreg Roach/** 29*1c6adce8SGreg Roach * Exception thrown when importing invalid GEDCOM data. 30*1c6adce8SGreg Roach */ 31*1c6adce8SGreg Roachclass InvalidGedcomEncodingException extends Exception 32*1c6adce8SGreg Roach{ 33*1c6adce8SGreg Roach /** 34*1c6adce8SGreg Roach * InvalidGedcomEncodingException constructor. 35*1c6adce8SGreg Roach * 36*1c6adce8SGreg Roach * @param string $charset 37*1c6adce8SGreg Roach */ 38*1c6adce8SGreg Roach public function __construct(string $charset) 39*1c6adce8SGreg Roach { 40*1c6adce8SGreg Roach $message = I18N::translate('Error: converting GEDCOM files from %s encoding to UTF-8 encoding not currently supported.', e($charset)); 41*1c6adce8SGreg Roach 42*1c6adce8SGreg Roach parent::__construct($message); 43*1c6adce8SGreg Roach } 44*1c6adce8SGreg Roach} 45