diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 086f025..21f3bc8 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1562,10 +1562,15 @@ function watchdog($type, $message, array $variables = NULL, $severity = WATCHDOG
       // We are not in a request context.
     }
 
-    // Call the logging hooks to log/process the message
-    foreach (\Drupal::moduleHandler()->getImplementations('watchdog') as $module) {
-      $function = $module . '_watchdog';
-      $function($log_entry);
+    try {
+      // Call the logging hooks to log/process the message
+      foreach (\Drupal::moduleHandler()->getImplementations('watchdog') as $module) {
+        $function = $module . '_watchdog';
+        $function($log_entry);
+      }
+    }
+    catch (InvalidArgumentException $e) {
+      trigger_error('Exception thrown while logging a system message. Original message: ' . strtr($message, $variables), E_USER_ERROR);
     }
 
     // It is critical that the semaphore is only cleared here, in the parent
