Project

General

Profile

« Previous | Next » 

Revision 7094

Added by Chris Jones over 12 years ago

Don't throw a JibXException, but rather convert it to a ServiceFailure.

View differences:

src/edu/ucsb/nceas/metacat/restservice/CNResourceHandler.java
888 888
     * Set the owner of a resource
889 889
     * 
890 890
     * @param id
891
     * @throws JiBXException
892 891
     * @throws InvalidToken
893 892
     * @throws ServiceFailure
894 893
     * @throws NotFound
895 894
     * @throws NotAuthorized
896 895
     * @throws NotImplemented
897 896
     * @throws InvalidRequest
898
     * @throws IOException
899 897
     * @throws IllegalAccessException
900 898
     * @throws InstantiationException
901 899
     * @throws VersionMismatch 
902 900
     */
903 901
    private void owner(String id) 
904
        throws JiBXException, InvalidToken, ServiceFailure, NotFound, 
905
        NotAuthorized, NotImplemented, InvalidRequest, InstantiationException, 
902
        throws InvalidToken, ServiceFailure, NotFound, NotAuthorized, 
903
        NotImplemented, InvalidRequest, InstantiationException, 
906 904
        IllegalAccessException, VersionMismatch {
907 905

  
908 906
        Identifier pid = new Identifier();
......
983 981
                e.getMessage();
984 982
            logMetacat.debug(msg);
985 983
            throw new ServiceFailure("4490", msg);
984
        
985
        } catch (JiBXException e) {
986
            String msg = "Couldn't marshall the identifier to the response output stream: " +
987
            e.getMessage();
988
            logMetacat.debug(msg);
989
            throw new ServiceFailure("4490", msg);
990
            
986 991
        }
987 992
    }
988 993

  

Also available in: Unified diff