File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
apps/dav/lib/Connector/Sabre Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 99
1010use Sabre \DAV \Exception ;
1111use Sabre \DAV \Version ;
12+ use TypeError ;
1213
1314/**
1415 * Class \OCA\DAV\Connector\Sabre\Server
@@ -47,20 +48,17 @@ public function start() {
4748 $ this ->httpRequest ->setBaseUrl ($ this ->getBaseUri ());
4849 $ this ->invokeMethod ($ this ->httpRequest , $ this ->httpResponse );
4950 } catch (\Throwable $ e ) {
50- if ($ e instanceof \TypeError) {
51+ try {
52+ $ this ->emit ('exception ' , [$ e ]);
53+ } catch (\Exception $ ignore ) {
54+ }
55+
56+ if ($ e instanceof TypeError) {
5157 /*
5258 * The TypeError includes the file path where the error occurred,
5359 * potentially revealing the installation directory.
54- *
55- * By re-throwing the exception, we ensure that the
56- * default exception handler processes it.
5760 */
58- throw $ e ;
59- }
60-
61- try {
62- $ this ->emit ('exception ' , [$ e ]);
63- } catch (\Exception $ ignore ) {
61+ $ e = new TypeError ('A type error occurred. For more details, please refer to the logs, which provide additional context about the type error. ' );
6462 }
6563
6664 $ DOM = new \DOMDocument ('1.0 ' , 'utf-8 ' );
You can’t perform that action at this time.
0 commit comments