package com.cardshifter.api.outgoing;

import com.cardshifter.api.messages.Message;

public class ErrorMessage extends Message {

	private String message;

    	public ErrorMessage() {
		this("");
	}

	/**
	 * @param message Error message text
	 */
	public ErrorMessage(String message) {
		super("error");
		this.message = message;
	}

	public String getMessage() {
		return message;
	}

	@Override
	public String toString() {
		return "ErrorMessage [message=" + message + "]";
	}

}

@@ -129,36 +129,96 @@
 %0A%0A%09p
-rivate String message;%0A%0A    
+ublic enum Cause %7B%0A%09%09CLIENT, SERVER%0A%09%7D%0A%0A%09private String message;%0A%09private Cause cause;%0A%0A
 %09pub
@@ -341,16 +341,103 @@
 sage) %7B%0A
+%09%09this(message, Cause.SERVER);%0A%09%7D%0A%0A%09public ErrorMessage(String message, Cause cause) %7B%0A
 %09%09super(
@@ -468,24 +468,46 @@
  = message;%0A
+%09%09this.cause = cause;%0A
 %09%7D%0A%0A%09public 
@@ -550,16 +550,63 @@
 ge;%0A%09%7D%0A%0A
+%09public Cause getCause() %7B%0A%09%09return cause;%0A%09%7D%0A%0A
 %09@Overri
@@ -681,16 +681,37 @@
 essage +
+ %22, cause=%22 + cause +
  %22%5D%22;%0A%09%7D

Add cause to ErrorMessage