package fr.minepod.bootstrap;

import java.awt.HeadlessException;
import java.io.IOException;

public class CrashReport {
	public static String DebugFilePath = Config.DebugFilePath;
	
	public static void SendReport(String exception, String when) {
		try {
			if(Config.Logger != null)
				Config.Logger.severe(exception);
			javax.swing.JOptionPane.showMessageDialog(null, exception + "\n" +  Langage.WHEN.toString() + when + "\n\n\n" + Langage.DEBUGINFORMATIONS.toString() + ":\n\n" + fr.minepod.Utils.Files.ReadFile(DebugFilePath), Langage.ERROR.toString(), javax.swing.JOptionPane.ERROR_MESSAGE);
		} catch (HeadlessException e) {
			if(Config.Logger != null)
				Config.Logger.severe(e.toString());
			javax.swing.JOptionPane.showMessageDialog(null, e.toString(),  Langage.ERROR.toString(), javax.swing.JOptionPane.ERROR_MESSAGE);
		} catch (IOException e) {
			if(Config.Logger != null)
				Config.Logger.severe(e.toString());
			javax.swing.JOptionPane.showMessageDialog(null, e.toString(),  Langage.ERROR.toString(), javax.swing.JOptionPane.ERROR_MESSAGE);
		}
        System.exit(0);
	}
}

@@ -62,16 +62,38 @@
 ption;%0D%0A
+import java.io.File;%0D%0A
 import j
@@ -147,72 +147,8 @@
  %7B%0D%0A
-%09public static String DebugFilePath = Config.DebugFilePath;%0D%0A%09%0D%0A
 %09pub
@@ -281,24 +281,184 @@
 xception);%0D%0A
+%09%09%09%0D%0A%09%09%09String debugMsg = %22%22;%0D%0A%09%09%09%0D%0A%09%09%09if(new File(Config.DebugFilePath).exists())%0D%0A%09%09%09%09debugMsg = fr.minepod.Utils.Files.ReadFile(Config.DebugFilePath);%0D%0A%09%09%09%0D%0A
 %09%09%09javax.swi
@@ -613,54 +613,16 @@
 %22 + 
-fr.minepod.Utils.Files.ReadFile(DebugFilePath)
+debugMsg
 , La

Check if debug file exists