WebfingerReconstructionException.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. declare(strict_types = 1);
  3. /**
  4. * StatusNet, the distributed open-source microblogging tool
  5. *
  6. * Class for an exception when a WebFinger acct: URI can not be constructed
  7. * using the data we have in a Profile.
  8. *
  9. * PHP version 5
  10. *
  11. * LICENCE: This program is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License as published by
  13. * the Free Software Foundation, either version 3 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  23. *
  24. * @category Exception
  25. * @package StatusNet
  26. *
  27. * @author Mikael Nordfeldth <mmn@hethane.se>
  28. * @copyright 2013 Free Software Foundation, Inc.
  29. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
  30. *
  31. * @see http://status.net/
  32. */
  33. namespace Component\FreeNetwork\Exception;
  34. use function App\Core\I18n\_m;
  35. use App\Util\Exception\ServerException;
  36. use Throwable;
  37. /**
  38. * Class for an exception when a WebFinger acct: URI can not be constructed
  39. * using the data we have in a Profile.
  40. *
  41. * @category Exception
  42. * @package StatusNet
  43. *
  44. * @author Mikael Nordfeldth <mmn@hethane.se>
  45. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
  46. *
  47. * @see http://status.net/
  48. */
  49. class WebfingerReconstructionException extends ServerException
  50. {
  51. public function __construct(string $message = '', int $code = 500, ?Throwable $previous = null)
  52. {
  53. // We could log an entry here with the search parameters
  54. parent::__construct(_m('WebFinger URI generation failed.'));
  55. }
  56. }