2024-09-18 03:23:19 -04:00
|
|
|
<?php
|
2025-05-14 09:51:42 -04:00
|
|
|
|
2026-02-09 04:53:58 -05:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2025-05-14 09:51:42 -04:00
|
|
|
use OCP\IL10N;
|
|
|
|
|
|
2024-09-18 03:23:19 -04:00
|
|
|
/**
|
|
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2012-2015 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
*/
|
2025-05-14 09:51:42 -04:00
|
|
|
function print_exception(Throwable $e, IL10N $l): void {
|
2024-09-18 03:23:19 -04:00
|
|
|
p($e->getTraceAsString());
|
|
|
|
|
|
|
|
|
|
if ($e->getPrevious() !== null) {
|
|
|
|
|
print_unescaped('<s:previous-exception>');
|
|
|
|
|
print_exception($e->getPrevious(), $l);
|
|
|
|
|
print_unescaped('</s:previous-exception>');
|
|
|
|
|
}
|
|
|
|
|
}
|