Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.gson.reflect.TypeToken;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.zeppelin.conf.ZeppelinConfiguration;
import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
import org.apache.zeppelin.display.AngularObject;
Expand Down Expand Up @@ -1147,7 +1148,18 @@ private void runParagraph(NotebookSocket conn, HashSet<String> userAndRoles, Not
}

AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal);
note.persist(subject);

try {
note.persist(subject);
} catch (FileSystemException ex) {
LOG.error("Exception from run", ex);
conn.send(serializeMessage(new Message(OP.ERROR_INFO).put("info",
"Oops! There is something wrong with the notebook file system. "
+ "Please check the logs for more details.")));
// don't run the paragraph when there is error on persisting the note information
return;
}

try {
note.run(paragraphId);
} catch (Exception ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,21 @@ angular.module('zeppelinWebApp').factory('websocketEvents',
$rootScope.$broadcast('noteRevision', data);
} else if (op === 'INTERPRETER_BINDINGS') {
$rootScope.$broadcast('interpreterBindings', data);
} else if (op === 'ERROR_INFO') {
BootstrapDialog.show({
closable: false,
closeByBackdrop: false,
closeByKeyboard: false,
title: 'Details',
message: data.info.toString(),
buttons: [{
// close all the dialogs when there are error on running all paragraphs
label: 'Close',
action: function() {
BootstrapDialog.closeAll();
}
}]
});
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ public static enum OP {
SAVE_INTERPRETER_BINDINGS, // [c-s] save interpreter bindings
// @param noteID
// @param selectedSettingIds
INTERPRETER_BINDINGS // [s-c] interpreter bindings
INTERPRETER_BINDINGS, // [s-c] interpreter bindings
ERROR_INFO // [s-c] error information to be sent
}

public OP op;
Expand Down