public static void showException(Exception e)
	{
		java.util.List<String> exception = new ArrayList<String>();

		exception.add("Exception: " + e);
		exception.add("Details: " + e.getMessage());
		exception.add("Stack-trace:");
		for(StackTraceElement ste: e.getStackTrace())
		{
			exception.add(" " + ste.getClassName() + ", "
					+ ste.getFileName() + ", "
					+ ste.getLineNumber() + ", "
					+ ste.getMethodName() + ", "
					+ (ste.isNativeMethod() ? "is native method" : "NOT a native method"));
		}

		for(String line : exception)
			log.add(line);

		try
		{
			BufferedWriter out = new BufferedWriter(new FileWriter("exceptions.log", true));

                	String ts = new SimpleDateFormat("E yyyy.MM.dd  hh:mm:ss a zzz").format(Calendar.getInstance().getTime());
			out.write(ts, 0, ts.length());
			out.newLine();

			for(String line : exception)
			{
				out.write(line, 0, line.length());
				out.newLine();
			}

			out.close();
		}
		catch(Exception ne)
		{
			log.add("Exception during exception-file-write: " + ne);
		}
	}