diff options
-rw-r--r-- | jMusicHub.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/jMusicHub.java b/jMusicHub.java index 56bb957..0fe2303 100644 --- a/jMusicHub.java +++ b/jMusicHub.java @@ -805,7 +805,11 @@ public static void listAudioBooksByAuthor(){ listPlaylistsByName(); break; case "PC": //display content of a chosen playlist - contentOfPlaylist(playlists); + try { + contentOfPlaylist(playlists); + } catch (InputMismatchException e) { + System.out.println("You typed something wrong... I'm aborting.."); + } break; case "AD" : // albums sorted by date listAlbumsByDate(); @@ -814,7 +818,11 @@ public static void listAudioBooksByAuthor(){ listAlbumsByGenre(); break; case "AC": //display content of a chosen album - contentOfAlbum(albums); + try { + contentOfAlbum(albums); + } catch (InputMismatchException e) { + System.out.println("You typed something wrong... I'm aborting.."); + } break; case "BA": //display audiobooks sorted by authors listAudioBooksByAuthor(); |