aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/musichub/business
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/musichub/business/MusicHub.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/musichub/business/MusicHub.java b/src/main/java/musichub/business/MusicHub.java
index bbac505..660f0f8 100644
--- a/src/main/java/musichub/business/MusicHub.java
+++ b/src/main/java/musichub/business/MusicHub.java
@@ -340,7 +340,7 @@ public class MusicHub {
}
- public void searchAudioElement() throws UnsupportedAudioFileException, NoAlbumFoundException, LineUnavailableException, IOException {
+ public void searchAudioElement() throws UnsupportedAudioFileException, NoAlbumFoundException, LineUnavailableException, IOException, NoElementFoundException {
Scanner scanner = new Scanner(System.in);
System.out.println("Entrez le titre ou l'artiste de la musique que vous souhaitez chercher dans la base de données");
String word = scanner.next().toLowerCase(Locale.ROOT);
@@ -353,7 +353,7 @@ public class MusicHub {
}
if(searchResult.isEmpty()){
- System.err.println("Aucun résultat pour votre recherche");
+ throw new NoElementFoundException("Any result for your search");
}
if (searchResult.size()==1){
this.getAudioElement(searchResult, searchResult.get(0).getTitle());
t/commit/dot_Xdefaults?id=b3e1a73b842173e85f503be2314d5d571732755d&follow=1'>Improving xterm conf (comments, buffer history, open links)clyhtsuriva1-19/+49 2024-03-21Adding networmanager_dmenu i3 keybindingclyhtsuriva1-0/+2 2024-03-17Updating i3 config and adding chatterino iconclyhtsuriva2-11/+13 2024-02-08Changing nagbar type for poweroffclyhtsuriva1-1/+1 2023-12-22Minor update of bashrc, aliasrc and i3's configclyhtsuriva3-1/+6 2023-06-27Change the LICENSE from WTFPLv2 to GPLv3clyhtsuriva2-10/+670 85150ecb9d08a521e6391cc160&follow=1'>Add new feature - display playlistmanthole5-0/+46 2021-06-27mvn packageClyhtsuriva11-6/+142 2021-06-27mvn packageClyhtsuriva26-301/+313 2021-06-27Fixing lower case issue following acceptance testClyhtsuriva1-9/+3 2021-06-27Fixing conflictsmanthole2-0/+139 2021-06-27Latest maven, jacoco and javadoc filesClyhtsuriva47-313/+822 2021-06-27Catch exception related to search functionalitysaid belhadj4-3/+11 2021-06-27Delete TEST-musichub.business.CategoryTest.xmlSaid Belhadj1-58/+0 2021-06-27Add unit test for Category and Languagesaid belhadj4-0/+164 2021-06-27Update search functionalitysaid belhadj2-0/+8 2021-06-27Added an extension check for songs and covered it with a test.Clyhtsuriva65-77/+92 2021-06-27Fix : Javadoc missingClyhtsuriva80-0/+8465 2021-06-27PlayList class covered at 84%.Clyhtsuriva14-78/+117 2021-06-27Song class fully covered.Clyhtsuriva13-49/+96 2021-06-27Starting Song testsClyhtsuriva17-59/+119 2021-06-27Changed the log type for the JUnit test of LogHandlerClyhtsuriva5-26/+4 2021-06-27XMLHandler tests covered at 91%Clyhtsuriva93-7962/+82