001package org.apache.tapestry5.json.exceptions; 002 003import org.apache.tapestry5.json.JSONType; 004 005public class JSONValueNotFoundException extends RuntimeException 006{ 007 008 private static final long serialVersionUID = -8709125433506778675L; 009 010 private final String location; 011 private final JSONType requiredType; 012 013 public JSONValueNotFoundException(String location, JSONType requiredType) 014 { 015 super(location + " is not found. Required: " + requiredType.name()); 016 this.location = location; 017 this.requiredType = requiredType; 018 } 019 020 public String getLocation() 021 { 022 return this.location; 023 } 024 025 public JSONType getRequiredType() 026 { 027 return this.requiredType; 028 } 029 030}