Throw a narrower exception
This commit is contained in:
parent
43b2d89703
commit
6e88d068ee
@ -172,7 +172,7 @@ public class Engine implements Jsonizable {
|
||||
throw new InternalError("This method should not be called when the engine is not in record mode.");
|
||||
}
|
||||
|
||||
public void initializeFromJSON(JSONObject o) throws Exception {
|
||||
public void initializeFromJSON(JSONObject o) throws JSONException {
|
||||
if (o == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package com.google.refine.browsing.facets;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.google.refine.Jsonizable;
|
||||
@ -54,5 +55,5 @@ public interface Facet extends Jsonizable {
|
||||
|
||||
public void computeChoices(Project project, FilteredRecords filteredRecords);
|
||||
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws Exception;
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws JSONException;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class ListFacet implements Facet {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws Exception {
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws JSONException {
|
||||
_name = o.getString("name");
|
||||
_expression = o.getString("expression");
|
||||
_columnName = o.getString("columnName");
|
||||
|
@ -159,7 +159,7 @@ public class RangeFacet implements Facet {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws Exception {
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws JSONException {
|
||||
_name = o.getString("name");
|
||||
_expression = o.getString("expression");
|
||||
_columnName = o.getString("columnName");
|
||||
|
@ -206,7 +206,7 @@ public class ScatterplotFacet implements Facet {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws Exception {
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws JSONException {
|
||||
name = o.getString(NAME);
|
||||
l = size = (o.has(SIZE)) ? o.getInt(SIZE) : 100;
|
||||
dot = (o.has(DOT)) ? o.getInt(DOT) : 0.5d;
|
||||
|
@ -84,7 +84,7 @@ public class TextSearchFacet implements Facet {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws Exception {
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws JSONException {
|
||||
_name = o.getString("name");
|
||||
_columnName = o.getString("columnName");
|
||||
|
||||
|
@ -111,7 +111,7 @@ public class TimeRangeFacet extends RangeFacet {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws Exception {
|
||||
public void initializeFromJSON(Project project, JSONObject o) throws JSONException {
|
||||
_name = o.getString("name");
|
||||
_expression = o.getString("expression");
|
||||
_columnName = o.getString("columnName");
|
||||
|
Loading…
Reference in New Issue
Block a user