diff options
Diffstat (limited to 'core/templates/print_xml_exception.php')
-rw-r--r-- | core/templates/print_xml_exception.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/templates/print_xml_exception.php b/core/templates/print_xml_exception.php new file mode 100644 index 00000000000..f103e13545f --- /dev/null +++ b/core/templates/print_xml_exception.php @@ -0,0 +1,18 @@ +<?php + +use OCP\IL10N; + +/** + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2012-2015 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only + */ +function print_exception(Throwable $e, IL10N $l): void { + p($e->getTraceAsString()); + + if ($e->getPrevious() !== null) { + print_unescaped('<s:previous-exception>'); + print_exception($e->getPrevious(), $l); + print_unescaped('</s:previous-exception>'); + } +} |