This commit is contained in:
pro.boooooo
2023-01-16 00:52:29 +01:00
parent 5d7acefae2
commit b7d56f4480
19 changed files with 21 additions and 23 deletions

View File

@@ -4,7 +4,7 @@ package fr.sae.JSonInspector.Exception;
* Exception lever lorsqu'une erreur de syntaxe est rencontrée
*/
public class JsonSyntaxException extends Throwable {
private static final String MESSAGE = "Syntax error in JSON file";
private static final String MESSAGE = "[!] La syntaxe du fichier JSON est incorrect";
public JsonSyntaxException() {
super(MESSAGE);

View File

@@ -20,7 +20,7 @@ public class ArrayObjectListener implements MouseListener {
/**
* Change le statut d'affichage de la ligne
*
* @param e the event to be processed
* @param e L'event en question
*/
@Override
public void mouseClicked(MouseEvent e) {

View File

@@ -21,7 +21,7 @@ public class Frame extends JFrame {
private Tree tree;
public Frame() {
super("Inspecteur JSON");
super("Inspecteur JSON - Romain Besson & Bilal Boudjemline");
init();
this.setVisible(true);
}
@@ -182,13 +182,14 @@ public class Frame extends JFrame {
cards.last(this.getContentPane());
} catch (MalformedURLException e) {
JOptionPane.showMessageDialog(this, "URL invalide", "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(this, "[!] URL invalide", "Error", JOptionPane.ERROR_MESSAGE);
} catch (JsonSyntaxException j) {
JOptionPane.showMessageDialog(this, "Erreur de syntax dans le fichier", "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(this, "[!] Erreur de syntax dans le fichier", "Error",
JOptionPane.ERROR_MESSAGE);
} catch (FileNotFoundException f) {
JOptionPane.showMessageDialog(this, "Impossible trouver le fichier", "Error", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(this, "[!]Impossible trouver le fichier", "Error", JOptionPane.ERROR_MESSAGE);
}
}

View File

@@ -18,11 +18,11 @@ public class Main {
System.out.println(new Tree(file));
} catch (MalformedURLException e) {
System.err.println("Invalid URL");
System.err.println("[!] Chemin du fichier invalide");
System.exit(1);
} catch (JsonSyntaxException j) {
System.err.println("Invalid syntax in file");
System.err.println("[!] Syntaxe du fichier invalide");
System.exit(1);
}
}