diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index e8cff8b..79a71ae 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -407,7 +407,7 @@ function theme_render_and_autoescape($arg) {
       $return = $arg->toString();
     }
     else {
-      throw new \Exception(t('Object of type "@class" cannot be printed.', array('@class' => get_class($arg))));
+      throw new \Exception('Object of type ' . get_class($arg) . ' cannot be printed.');
     }
   }
 
diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php
index 693da9a..d0d6e65 100644
--- a/core/lib/Drupal/Core/Template/TwigExtension.php
+++ b/core/lib/Drupal/Core/Template/TwigExtension.php
@@ -438,7 +438,7 @@ public function escapeFilter(\Twig_Environment $env, $arg, $strategy = 'html', $
         $return = $arg->toString();
       }
       else {
-        throw new \Exception(t('Object of type "@class" cannot be printed.', array('@class' => get_class($arg))));
+        throw new \Exception('Object of type ' . get_class($arg) . ' cannot be printed.');
       }
     }
 
@@ -516,7 +516,7 @@ public function renderVar($arg) {
         return $arg->toString();
       }
       else {
-        throw new \Exception(t('Object of type "@class" cannot be printed.', array('@class' => get_class($arg))));
+        throw new \Exception('Object of type ' . get_class($arg) . ' cannot be printed.');
       }
     }
 
