diff --git a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php
index c8bc8b1..15c1f07 100644
--- a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php
@@ -87,7 +87,7 @@ protected function getErrorLevel() {
   protected function onHtml(GetResponseForExceptionEvent $event) {
     $exception = $event->getException();
     $error = Error::decodeException($exception);
-    $flatten_exception = FlattenException::create($exception, 500);
+    $flatten_exception = $exception;
 
     // Display the message if the current error reporting level allows this type
     // of message to be displayed, and unconditionally in update.php.
@@ -127,7 +127,7 @@ protected function onHtml(GetResponseForExceptionEvent $event) {
 
         // Generate a backtrace containing only scalar argument values. Make
         // sure the backtrace is escaped as it can contain user submitted data.
-        $message .= '<pre class="backtrace">' . SafeMarkup::escape(Error::formatFlattenedBacktrace($backtrace)) . '</pre>';
+        $message .= '<pre class="backtrace">' . SafeMarkup::escape(Error::formatBacktrace($backtrace)) . '</pre>';
       }
       drupal_set_message(SafeMarkup::set($message), $class, TRUE);
     }
diff --git a/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php b/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
index 8325058..790c7ed 100644
--- a/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
+++ b/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php
@@ -88,7 +88,7 @@ public function onException(GetResponseForExceptionEvent $event) {
     $exception = $event->getException();
 
     // Make the exception available for example when rendering a block.
-    $event->getRequest()->attributes->set('exception', FlattenException::create($exception));
+    $event->getRequest()->attributes->set('exception', $exception);
 
     $handled_formats = $this->getHandledFormats();
 
diff --git a/core/lib/Drupal/Core/Utility/Error.php b/core/lib/Drupal/Core/Utility/Error.php
index 3b9e91c..9fb001b 100644
--- a/core/lib/Drupal/Core/Utility/Error.php
+++ b/core/lib/Drupal/Core/Utility/Error.php
@@ -187,57 +187,4 @@ public static function formatBacktrace(array $backtrace) {
     return $return;
   }
 
-  /**
-   * Formats a flattened backtrace into a plain-text string.
-   *
-   * The calls show values for scalar arguments and type names for complex ones.
-   *
-   * @param array $backtrace
-   *   The backtrace of a Symfony\Component\Debug\Exception\FlattenException.
-   *
-   * @return string
-   *   A plain-text line-wrapped string. The string needs to be run through
-   *   SafeMarkup::escape when rendering it as HTML.
-   */
-  public static function formatFlattenedBacktrace(array $backtrace) {
-    $return = '';
-
-    foreach ($backtrace as $trace) {
-      $call = array('function' => '', 'args' => array());
-
-      if (isset($trace['class'])) {
-        $call['function'] = $trace['class'] . $trace['type'] . $trace['function'];
-      }
-      elseif (isset($trace['function'])) {
-        $call['function'] = $trace['function'];
-      }
-      else {
-        $call['function'] = 'main';
-      }
-
-      if (isset($trace['args'])) {
-        foreach ($trace['args'] as $arg) {
-          $type = $arg[0];
-          $value = $arg[1];
-          if ($type == 'array') {
-            $call['args'][] = '[' . ucfirst($type) . ']';
-          }
-          elseif ($type == 'null') {
-            $call['args'][] = strtoupper($type);
-          }
-          elseif ($type == 'boolean') {
-            $call['args'][] = $value ? 'TRUE' : 'FALSE';
-          }
-          else {
-            $call['args'][] = $value;
-          }
-        }
-      }
-
-      $return .= $call['function'] . '(' . implode(', ', $call['args']) . ")\n";
-    }
-
-    return $return;
-  }
-
 }
