]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Show more descriptive error instead of blank page when connection failed
authorBram Matthys <redacted>
Sat, 14 Jan 2023 16:20:42 +0000 (17:20 +0100)
committerBram Matthys <redacted>
Sat, 14 Jan 2023 16:22:44 +0000 (17:22 +0100)
to UnrealIRCd.

This requires one to update to latest unrealircd-rpc-php, end users will
need to run 'composer install'

composer.lock
connection.php

index 5e172cbece6fe5721ec1e424e57349917c716777..be15680d64703765f1271856b67275356e2a4085 100644 (file)
             "source": {
                 "type": "git",
                 "url": "https://github.com/unrealircd/unrealircd-rpc-php.git",
-                "reference": "29c42a5bc6ad7607561cf4dbf6a777a348d3a30b"
+                "reference": "57c1d592f076a9e06be89345cfe84d9e54a8664a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/unrealircd/unrealircd-rpc-php/zipball/29c42a5bc6ad7607561cf4dbf6a777a348d3a30b",
-                "reference": "29c42a5bc6ad7607561cf4dbf6a777a348d3a30b",
+                "url": "https://api.github.com/repos/unrealircd/unrealircd-rpc-php/zipball/57c1d592f076a9e06be89345cfe84d9e54a8664a",
+                "reference": "57c1d592f076a9e06be89345cfe84d9e54a8664a",
                 "shasum": ""
             },
             "require": {
                 "issues": "https://github.com/unrealircd/unrealircd-rpc-php/issues",
                 "source": "https://github.com/unrealircd/unrealircd-rpc-php/tree/main"
             },
-            "time": "2023-01-14T07:08:42+00:00"
+            "time": "2023-01-14T16:19:46+00:00"
         }
     ],
     "packages-dev": [],
index 985d3fb0af313eae5b15cff1c01fb20c468d54ce..ba17c905696b65032f52db248f2075c39b86eceb 100644 (file)
@@ -20,6 +20,12 @@ try {
                        $api_login,
                        Array("tls_verify"=>$tls_verify)
                );
-} catch (Exception $e) {
-               die("Unable to connect to UnreaIRCd<br>");
+}
+catch (Exception $e)
+{
+       echo "Unable to connect to UnrealIRCd: ".$e->getMessage() . "<br><br>";
+       echo "Verify your connection details in config.php (rpc user, rpc password, host) and ".
+            "verify your UnrealIRCd configuration (listen block with listen::options::rpc and ".
+            "an rpc-user block with the correct IP allowed and the correct username and password).";
+       throw $e;
 }