Skip to content

Commit

Permalink
Add more debugging output
Browse files Browse the repository at this point in the history
  • Loading branch information
jankatins committed Apr 15, 2016
1 parent 37db6e3 commit d426422
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/execution.r
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ execute = function(request) {
output_handler = new_output_handler(error = function(e) nframe <<- sys.nframe())))

handle_error <- function(e) {
log_debug('Error output: %s', toString(e))
calls <- head(sys.calls()[-seq_len(nframe + 1L)], -3)

msg <- paste0(toString(e), 'Traceback:\n')
Expand Down Expand Up @@ -197,9 +198,9 @@ execute = function(request) {
paste(stack_info, collapse='\n'))
log_debug(msg)
send_error_msg(msg)
}
}
handle_value <- function(obj) {
log_debug("Value output...")
mimebundle <- prepare_mimebundle(obj, handle_display_error)
if (length(intersect(class(obj), getOption('jupyter.pager_classes'))) > 0) {
log_debug('Showing pager: %s', paste(capture.output(str(mimebundle$data)), collapse = '\n'))
Expand All @@ -218,6 +219,7 @@ execute = function(request) {
}

handle_graphics <- function(plotobj) {
log_debug("Graphics output...")
if (!plot_builds_upon(last_recorded_plot, plotobj)) {
log_debug('Sending plot...')
send_plot(last_recorded_plot)
Expand Down

0 comments on commit d426422

Please sign in to comment.