         @cli.text 'Compiled JavaScript:'
         @cli.source 'javascript', compiled
 
+      error: (message) ->
+        $pre = $ '<pre class="error"/>'
+        $pre.text message
+        run_context.output $pre
+
+      display_object: (object) ->
+        for handler in result_handlers
+          return if handler.call run_context, object
+
       value: (value) -> _lead_cli_value: value
       open_file: -> open_file_picker run_context
       export_notebook: -> export_notebook input_cell

        `with (run_context.cli) { with (run_context.functions) { with (run_context.vars) {`
        result = eval compiled
        `}}}`
        display_object result
      catch e
        run_context.handle_exception e, compiled

      scroll_to_result $top

    output_cell

  opening_run_context = null


      setTimeout ->
        $('html, body').scrollTop top
      , 10

    result_handlers =[
      ignored,
      handle_cli_cmd,
      handle_renderable,
      handle_lead_node,
      handle_any_object
    ]

    output = ($target) ->
      (output) ->
