Print complete messages
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 28 Oct 2024 12:29:38 +0000 (13:29 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 28 Oct 2024 12:29:38 +0000 (13:29 +0100)
wcfsetup/install/files/service-worker/index.php

index 60fb5e0e48b25c2c1035d23731fc95636e7e1cbf..b388f4cc43e486a957ededac8ca9ac323edab21e 100644 (file)
@@ -108,7 +108,7 @@ function openDatabase() {
                };
 
                request.onerror = (event) => {
-                       reject("Database error: " + event.target.errorCode);
+                       reject("Database error: %s", event.target.errorCode);
                };
        });
 }
@@ -134,14 +134,14 @@ function saveLastNotificationTimestamp(timestamp) {
                        };
 
                        getRequest.onerror = () => {
-                               console.error("Failed to retrieve timestamp", getRequest.error);
+                               console.error("Failed to retrieve timestamp: %s", getRequest.error);
                        };
 
                        tx.onerror = () => {
-                               console.error("Transaction error", tx.error);
+                               console.error("Transaction error: %s", tx.error);
                        };
                })
-               .catch((err) => console.error("Failed to open database", err));
+               .catch((err) => console.error("Failed to open database: %s", err));
 }
 
 function getLastNotificationTimestamp() {