 
   showError: (result) ->
     # console.log('showError', result)
-    failureMessage = result?.message
+    failureMessage = if result and result.message 
+      '<div class="text-error preview-text-error">' + result.message.replace(/\n/g, '<br/>') + '</div>' 
+    else 
+      ""
+    stackDump = if result and result.stack 
+      '<div class="text-warning preview-text-warning">' + result.stack.replace(/\n/g, '<br/>') + '</div>' 
+    else 
+      ""
     @showMessage()
     @messageView.message.html $$$ ->
       @div

          @span
            class: 'loading loading-spinner-large inline-block'
          @div
            class: 'text-highlight',
            'Loading Preview\u2026'

  showMessage: ->

          @span
            class: 'loading loading-spinner-large inline-block'
          @div
            class: 'text-highlight preview-text-highlight',
            'Previewing Failed\u2026'
          @raw failureMessage if failureMessage?
          @raw stackDump if stackDump?

  showLoading: ->
    @showMessage()
