diff --git a/modules/cart/commerce_cart.module b/modules/cart/commerce_cart.module
index d9d0ada..3865b7e 100644
--- a/modules/cart/commerce_cart.module
+++ b/modules/cart/commerce_cart.module
@@ -418,27 +418,39 @@ function commerce_cart_block_view($delta) {
 
   // Prepare the display of the default Shopping Cart block.
   if ($delta == 'cart') {
-    // First check for items in the shopping cart.
-    $order = commerce_cart_order_load($user->uid);
+    try {
+      // First check for items in the shopping cart.
+      $order = commerce_cart_order_load($user->uid);
+
+      // If the cart is empty...
+      if (!$order || empty($order->commerce_line_items)) {
+        // Display an appropriate message.
+        $content = theme('commerce_cart_empty_block');
+      }
+      else {
+        drupal_add_css(drupal_get_path('module', 'commerce_cart') . '/theme/commerce_cart.css');
 
-    // If the cart is empty...
-    if (!$order || empty($order->commerce_line_items)) {
-      // Display an appropriate message.
-      $content = theme('commerce_cart_empty_block');
-    }
-    else {
-      drupal_add_css(drupal_get_path('module', 'commerce_cart') . '/theme/commerce_cart.css');
+        // Build the variables array to send to the cart block template.
+        $variables = array(
+          'order' => $order,
+          'contents_view' => commerce_embed_view('commerce_cart_block', 'defaults', array($order->order_id)),
+        );
 
-      // Build the variables array to send to the cart block template.
-      $variables = array(
-        'order' => $order,
-        'contents_view' => commerce_embed_view('commerce_cart_block', 'defaults', array($order->order_id)),
-      );
+        $content = theme('commerce_cart_block', $variables);
+      }
 
-      $content = theme('commerce_cart_block', $variables);
+      return array('subject' => t('Shopping cart'), 'content' => $content);
     }
+    catch (Exception $exception) {
+      require_once DRUPAL_ROOT . '/includes/errors.inc';
+
+      // Block failed to render, hide it and log the exception.
+      watchdog_exception('block', $exception);
 
-    return array('subject' => t('Shopping cart'), 'content' => $content);
+      if (error_displayable()) {
+        return array('subject' => t('Shopping cart'), 'content' => t('Failed to render block: (%type: !message in %function (line %line of %file)).', _drupal_decode_exception($exception)));
+      }
+    }
   }
 }
 
diff --git a/modules/product_reference/commerce_product_reference.module b/modules/product_reference/commerce_product_reference.module
index 71181cd..7d12552 100644
--- a/modules/product_reference/commerce_product_reference.module
+++ b/modules/product_reference/commerce_product_reference.module
@@ -173,52 +173,66 @@ function commerce_product_reference_commerce_product_delete($product) {
  * display if the product contains a non-empty product reference field.
  */
 function commerce_product_reference_entity_view($entity, $entity_type, $view_mode, $langcode) {
-  $wrapper = entity_metadata_wrapper($entity_type, $entity);
-  list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
-
-  $instances = field_info_instances($entity_type, $bundle);
-
-  // Loop through product reference fields to see if any exist on this entity
-  // bundle that is either hidden or displayed with the Add to Cart form display
-  // formatter.
-  foreach (commerce_info_fields('commerce_product_reference', $entity_type) as $field_name => $field) {
-    if (isset($instances[$field_name])) {
-      // Find the default product based on the cardinality of the field.
-      if ($field['cardinality'] == 1) {
-        $product = $wrapper->{$field_name}->value();
-      }
-      else {
-        $product = $wrapper->{$field_name}->get(0)->value();
-      }
+  try {
+    $wrapper = entity_metadata_wrapper($entity_type, $entity);
+    list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
+
+    $instances = field_info_instances($entity_type, $bundle);
+
+    // Loop through product reference fields to see if any exist on this entity
+    // bundle that is either hidden or displayed with the Add to Cart form display
+    // formatter.
+    foreach (commerce_info_fields('commerce_product_reference', $entity_type) as $field_name => $field) {
+      if (isset($instances[$field_name])) {
+        // Find the default product based on the cardinality of the field.
+        if ($field['cardinality'] == 1) {
+          $product = $wrapper->{$field_name}->value();
+        }
+        else {
+          $product = $wrapper->{$field_name}->get(0)->value();
+        }
 
-      // If we found a product and the reference field enables field injection...
-      if (!empty($product) && $instances[$field_name]['settings']['field_injection']) {
+        // If we found a product and the reference field enables field injection...
+        if (!empty($product) && $instances[$field_name]['settings']['field_injection']) {
 
-        // Add the display context for these field to the product.
-        $product->display_context = array(
+          // Add the display context for these field to the product.
+          $product->display_context = array(
           'entity_type' => $entity_type,
           'entity' => $entity,
-        );
+          );
 
-        // Loop through the fields on the referenced product's type.
-        foreach (field_info_instances('commerce_product', $product->type) as $product_field_name => $product_field) {
-          // Add the product field to the entity's content array.
-          $entity->content['product:' . $product_field_name] = field_view_field('commerce_product', $product, $product_field_name, $entity_type . '_' . $view_mode);
+          // Loop through the fields on the referenced product's type.
+          foreach (field_info_instances('commerce_product', $product->type) as $product_field_name => $product_field) {
+            // Add the product field to the entity's content array.
+            $entity->content['product:' . $product_field_name] = field_view_field('commerce_product', $product, $product_field_name, $entity_type . '_' . $view_mode);
 
-          // For multiple value references, add context information so the cart
-          // form can do dynamic replacement of fields.
-          if ($field['cardinality'] != 1) {
-            $class = array($entity_type, $id, 'product', $product_field_name);
+            // For multiple value references, add context information so the cart
+            // form can do dynamic replacement of fields.
+            if ($field['cardinality'] != 1) {
+              $class = array($entity_type, $id, 'product', $product_field_name);
 
-            $entity->content['product:' . $product_field_name] += array(
+              $entity->content['product:' . $product_field_name] += array(
               '#prefix' => '<span class="' . drupal_html_class(implode('-', $class)) . '">',
               '#suffix' => '</span>',
-            );
+              );
+            }
           }
         }
       }
     }
   }
+  catch (Exception $exception) {
+    require_once DRUPAL_ROOT . '/includes/errors.inc';
+    // Failure to display the product reference.
+    if (!empty($id) && !empty($entity_type)) {
+      watchdog('commerce_product_reference', 'Failed to display entity %id of type %type because a product reference could not be rendered. Perhaps the referenced product has been deleted.', array('%id' => $id, '%type' => $entity_type));
+    }
+    watchdog_exception('commerce_product_reference', $exception);
+
+    if (error_displayable()) {
+      $entity->content['error'] = array('#markup' => t('Product reference failed to render. The referenced product may have been deleted.'));
+    }
+  }
 }
 
 /**
