Index: /trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java
===================================================================
--- /trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java	(revision 1354)
+++ /trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java	(revision 1355)
@@ -164,4 +164,10 @@
             }
             catch (IllegalArgumentException e) {
+                Console.println("invalid parameter provided: " + e.getMessage());
+                Console.println("Usage: " + cmd.help());
+            }
+            catch (Exception e) {
+                Console.println("error executing command: " + e);
+                Console.logException(e);
                 Console.println("Usage: " + cmd.help());
             }
Index: /trunk/java-utils/src/main/java/de/ugoe/cs/util/console/TextConsole.java
===================================================================
--- /trunk/java-utils/src/main/java/de/ugoe/cs/util/console/TextConsole.java	(revision 1354)
+++ /trunk/java-utils/src/main/java/de/ugoe/cs/util/console/TextConsole.java	(revision 1355)
@@ -28,6 +28,6 @@
 /**
  * <p>
- * Implements a simple console observer that prints normal text to
- * {@code stdout}, errors to {@code stderr} and reads from {@code stdin}.
+ * Implements a simple console observer that prints normal text to {@code stdout}, errors to
+ * {@code stderr} and reads from {@code stdin}.
  * </p>
  * 
@@ -35,126 +35,146 @@
  * @version 1.0
  */
-public class TextConsole implements IOutputListener, IErrorListener,
-		ITraceListener, IExceptionListener {
-	
-	/**
-	 * <p>Defines the trace level used by this console.</p>
-	 */
-	private Level traceLevel;
-	
-	private final SimpleDateFormat ft = new SimpleDateFormat("HH:mm:ss");
-	
-	/**
-         * <p>
-         * Creates a new text console and automatically registers it as observer. The trace level is {@link Level#WARNING}.
-         * </p>
-	 */
-	public TextConsole() {
-	    this(Level.WARNING);
-	}
+public class TextConsole implements IOutputListener, IErrorListener, ITraceListener,
+    IExceptionListener
+{
 
-	/**
-	 * <p>
-	 * Creates a new text console and automatically registers it as observer.
-	 * </p>
-	 * @param traceLevel trace level used by this text console
-	 */
-	public TextConsole(Level traceLevel) {
-		Console.getInstance().registerOutputListener(this);
-		Console.getInstance().registerErrorListener(this);
-		Console.getInstance().registerTraceListener(this);
-		Console.getInstance().registerExceptionListener(this);
-		this.traceLevel = traceLevel;
-	}
+    /**
+     * <p>
+     * Defines the trace level used by this console.
+     * </p>
+     */
+    private Level traceLevel;
 
-	/**
-	 * <p>
-	 * Prints messages to {@code stdout}.
-	 * </p>
-	 * 
-	 * @see ConsoleObserver#outputMsg(java.lang.String)
-	 */
-	public void outputMsg(String newMessage) {
-		System.out.print(newMessage);
-	}
+    private final SimpleDateFormat ft = new SimpleDateFormat("HH:mm:ss");
 
-	/**
-	 * <p>
-	 * Prints messages to {@code stderr}.
-	 * </p>
-	 * 
-	 * @see ConsoleObserver#errorMsg(String)
-	 */
-	@Override
-	public void errorMsg(String errMessage) {
-		System.err.print(errMessage);
-	}
+    /**
+     * <p>
+     * Creates a new text console and automatically registers it as observer. The trace level is
+     * {@link Level#WARNING}.
+     * </p>
+     */
+    public TextConsole() {
+        this(Level.WARNING);
+    }
 
-	/**
-	 * <p>
-	 * Prints the stacktrace of an exception to {@code stderr}.
-	 * </p>
-	 * 
-	 * @see ConsoleObserver#logException(Exception)
-	 */
-	@Override
-	public void logException(Exception e) {
-		System.err.println(e.getMessage());
-	}
+    /**
+     * <p>
+     * Creates a new text console and automatically registers it as observer.
+     * </p>
+     * 
+     * @param traceLevel
+     *            trace level used by this text console
+     */
+    public TextConsole(Level traceLevel) {
+        Console.getInstance().registerOutputListener(this);
+        Console.getInstance().registerErrorListener(this);
+        Console.getInstance().registerTraceListener(this);
+        Console.getInstance().registerExceptionListener(this);
+        this.traceLevel = traceLevel;
+    }
 
-	/**
-	 * <p>
-	 * Prints messages to {@code stdout}. These messages are only printed, if
-	 * the console is run in debug mode.
-	 * </p>
-	 */
-	@Override
-	public void traceMsg(String traceMessage, Level level) {
-		if (level.intValue()>=traceLevel.intValue()) {
-			System.out.print("[" + level.toString() + "] [" + ft.format(new Date()) + "] " + traceMessage);
-		}
-	}
+    /**
+     * <p>
+     * Prints messages to {@code stdout}.
+     * </p>
+     * 
+     * @see ConsoleObserver#outputMsg(java.lang.String)
+     */
+    public void outputMsg(String newMessage) {
+        System.out.print(newMessage);
+    }
 
-	/**
-	 * <p>
-	 * Starts a new TextConsole. If the text console is started, it can be used
-	 * not only to print message, but also to execute commands by reading
-	 * {@code stdin}.
-	 * </p>
-	 */
-	public void run() {
-		CommandExecuter exec = CommandExecuter.getInstance();
-		while (true) {
-			System.out.print("> ");
-			String command = getCommand().trim();
-			if (!command.equals("")) {
-				exec.exec(command);
-			}
-		}
-	}
+    /**
+     * <p>
+     * Prints messages to {@code stderr}.
+     * </p>
+     * 
+     * @see ConsoleObserver#errorMsg(String)
+     */
+    @Override
+    public void errorMsg(String errMessage) {
+        System.err.print(errMessage);
+    }
 
-	/**
-	 * <p>
-	 * Reads a new command from {@code stdin}.
-	 * </p>
-	 * 
-	 * @return a string with a command
-	 */
-	protected String getCommand() {
-		byte[] buffer = new byte[1024];
-		int bytesRead = 0;
-		String command;
-		try {
-			bytesRead = System.in.read(buffer);
-		} catch (IOException e) {
+    /**
+     * <p>
+     * Prints the stacktrace of an exception to {@code stderr} if the log level is more or equally
+     * detailed to <code>Level.FINE</code>. Otherwise, it just prints a line naming the exception
+     * or only the message, if any. 
+     * </p>
+     * 
+     * @see ConsoleObserver#logException(Exception)
+     */
+    @Override
+    public void logException(Exception e) {
+        if (traceLevel.intValue() > Level.FINE.intValue()) {
+            if (e.getMessage() != null) {
+                System.err.println(e.getMessage());
+            }
+            else {
+                System.err.println(e);
+            }
+        }
+        else {
+            e.printStackTrace(System.err);
+        }
+    }
 
-		}
-		if (bytesRead == 0) {
-			command = "";
-		} else {
-			command = new String(buffer, Charset.defaultCharset());
-		}
-		return command;
-	}
+    /**
+     * <p>
+     * Prints messages to {@code stdout}. These messages are only printed, if the console is run in
+     * debug mode.
+     * </p>
+     */
+    @Override
+    public void traceMsg(String traceMessage, Level level) {
+        if (level.intValue() >= traceLevel.intValue()) {
+            System.out.print("[" + level.toString() + "] [" + ft.format(new Date()) + "] " +
+                traceMessage);
+        }
+    }
+
+    /**
+     * <p>
+     * Starts a new TextConsole. If the text console is started, it can be used not only to print
+     * message, but also to execute commands by reading {@code stdin}.
+     * </p>
+     */
+    public void run() {
+        CommandExecuter exec = CommandExecuter.getInstance();
+        while (true) {
+            System.out.print("> ");
+            String command = getCommand().trim();
+            if (!command.equals("")) {
+                exec.exec(command);
+            }
+        }
+    }
+
+    /**
+     * <p>
+     * Reads a new command from {@code stdin}.
+     * </p>
+     * 
+     * @return a string with a command
+     */
+    protected String getCommand() {
+        byte[] buffer = new byte[1024];
+        int bytesRead = 0;
+        String command;
+        try {
+            bytesRead = System.in.read(buffer);
+        }
+        catch (IOException e) {
+
+        }
+        if (bytesRead == 0) {
+            command = "";
+        }
+        else {
+            command = new String(buffer, Charset.defaultCharset());
+        }
+        return command;
+    }
 
 }
