Fixing exception management
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@144251 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
dbab124043
commit
3e7084ae57
|
@ -11,9 +11,8 @@ import javax.ws.rs.QueryParam;
|
|||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetNotFoundException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.er.ERNotFoundException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.query.InvalidQueryException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
|
||||
import org.gcube.informationsystem.resourceregistry.api.rest.AccessPath;
|
||||
import org.gcube.informationsystem.resourceregistry.er.ERManagement;
|
||||
|
@ -88,7 +87,7 @@ public class Access {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getInstance(@PathParam(TYPE_PATH_PARAM) String type,
|
||||
@PathParam(ID_PATH_PARAM) String id)
|
||||
throws ResourceRegistryException {
|
||||
throws ERNotFoundException, ResourceRegistryException {
|
||||
logger.info("Requested {} with id {}", type, id);
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
@ -116,7 +115,7 @@ public class Access {
|
|||
@QueryParam(AccessPath.POLYMORPHIC_PARAM) Boolean polymorphic,
|
||||
@QueryParam(AccessPath.REFERENCE) String reference,
|
||||
@QueryParam(AccessPath.DIRECTION) String direction)
|
||||
throws FacetNotFoundException, ResourceRegistryException {
|
||||
throws ResourceRegistryException {
|
||||
logger.info("Requested {} ({}={}) instances", type,
|
||||
AccessPath.POLYMORPHIC_PARAM, polymorphic);
|
||||
|
||||
|
@ -174,8 +173,7 @@ public class Access {
|
|||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getSchema(@PathParam(TYPE_PATH_PARAM) String type,
|
||||
@QueryParam(AccessPath.POLYMORPHIC_PARAM) Boolean polymorphic)
|
||||
throws SchemaNotFoundException, SchemaException,
|
||||
ResourceRegistryException {
|
||||
throws SchemaNotFoundException, ResourceRegistryException {
|
||||
logger.info("Requested Schema for type {}", type);
|
||||
|
||||
SchemaManagement schemaManagement = new SchemaManagementImpl();
|
||||
|
|
Loading…
Reference in New Issue