print_xml_exception.php 452 B

12345678910111213141516
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2012-2015 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. function print_exception(Throwable $e, \OCP\IL10N $l): void {
  8. p($e->getTraceAsString());
  9. if ($e->getPrevious() !== null) {
  10. print_unescaped('<s:previous-exception>');
  11. print_exception($e->getPrevious(), $l);
  12. print_unescaped('</s:previous-exception>');
  13. }
  14. }