Examples of XMLDBException


Examples of org.xmldb.api.base.XMLDBException

            params.put(RPCDefaultMessage.COLLECTION, collPath);
            // TODO: In case of error get error code. Current XMLPRC does not provide place for detailed error code.
            String exists = (String) runRemoteCommand("GetCollectionConfiguration", params);

            if (!"yes".equals(exists)) {
                throw new XMLDBException(ErrorCodes.NO_SUCH_COLLECTION,
                                         "Collection not found: " + collPath);
            }
        } catch (MalformedURLException e) {
            client = null;
            throw new XMLDBException(ErrorCodes.INVALID_URI, e);
        } catch (XMLDBException x) {
            throw x;  // propagate any xmldb exception.
        } catch (IOException e) {
            client = null;
            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, FaultCodes.GEN_GENERAL_ERROR,
                                     "Cannot communicate with the server: " + xmlRpcURL, e);
        } catch (Exception e) {
            client = null;
            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, FaultCodes.JAVA_RUNTIME_ERROR,
                                     "Collection not found: " + collPath, e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.