0dae0a38665083f77e8693fcb7d30cfb6d96820c
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / JsonErrorReturnObject.java
1 /*
2  * © 2013 xplosion interactive
3  */
4
5 package net.pterodactylus.sone.web.ajax;
6
7 import com.fasterxml.jackson.annotation.JsonProperty;
8
9 /**
10  * {@link JsonReturnObject} that signals an error has occured.
11  *
12  * @author <a href="mailto:d.roden@xplosion.de">David Roden</a>
13  */
14 public class JsonErrorReturnObject extends JsonReturnObject {
15
16         /** The error that has occured. */
17         @JsonProperty
18         private final String error;
19
20         /**
21          * Creates a new error JSON return object.
22          *
23          * @param error
24          *              The error that occured
25          */
26         public JsonErrorReturnObject(String error) {
27                 super(false);
28                 this.error = error;
29         }
30
31 }