File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -159,13 +159,16 @@ public Note createNote(List<String> interpreterIds) throws IOException {
159159 * Export existing note.
160160 * @param noteId - the note ID to clone
161161 * @return Note JSON
162- * @throws IOException
162+ * @throws IOException, IllegalArgumentException
163163 */
164- public String exportNote (String noteId ) throws IOException {
164+ public String exportNote (String noteId ) throws IOException , IllegalArgumentException {
165165 GsonBuilder gsonBuilder = new GsonBuilder ();
166166 gsonBuilder .setPrettyPrinting ();
167167 Gson gson = gsonBuilder .create ();
168168 Note note = getNote (noteId );
169+ if (note == null ) {
170+ throw new IllegalArgumentException (noteId + "not found" );
171+ }
169172 return gson .toJson (note );
170173 }
171174
You can’t perform that action at this time.
0 commit comments