001package org.apache.tapestry5.json.exceptions;
002
003public class JSONInvalidTypeException extends RuntimeException
004{
005
006    private static final long serialVersionUID = 934805933638996600L;
007
008    private Class<? extends Object> invalidClass;
009
010    public JSONInvalidTypeException(Class<? extends Object> invalidClass)
011    {
012        super("JSONArray values / JSONObject properties may be one of Boolean, Number, String, org.apache.tapestry5.json.JSONArray, org.apache.tapestry5.json.JSONLiteral, org.apache.tapestry5.json.JSONObject, org.apache.tapestry5.json.JSONObject$Null, org.apache.tapestry5.json.JSONString. Type "
013                + invalidClass.getName() + " is not allowed.");
014
015        this.invalidClass = invalidClass;
016    }
017
018    public Class<? extends Object> getInvalidClass()
019    {
020        return this.invalidClass;
021    }
022}