Package org.trpr.platform.core

Examples of org.trpr.platform.core.PlatformException


        File handlerFile = null;
        try {
            handlerFile = this.getHandlerConfig(handlerName).getFile();
        } catch (NullPointerException e) {
            LOGGER.error("Resource for handler: " + handlerName + " not found. Returning");
            throw new PlatformException("File not found for handler: " + handlerName, e);
        } catch (IOException e) {
            LOGGER.error("Handler Config File for handler: " + handlerName + " not found. Returning");
            throw new PlatformException("File not found for handler: " + handlerName, e);
        }

        // Check if file actually exists
        if (!handlerFile.exists()) {
            LOGGER.error("Handler Config File: " + handlerFile.getAbsolutePath() + " doesn't exist. Returning");
            throw new PlatformException("File not found: " + handlerFile.getAbsolutePath());
        }

        // Check for read permissions
        if (!handlerFile.canRead()) {
            LOGGER.error("No read permission for: " + handlerFile.getAbsolutePath() + ". Returning");
            throw new PlatformException("Read permissions not found for file: " + handlerFile.getAbsolutePath());
        }

        // get the registered AbstractHandler for the file name
        T handler = this.configURItoHandlerName.get(handlerFile.toURI()).get(0);
View Full Code Here

TOP

Related Classes of org.trpr.platform.core.PlatformException

Copyright © 2018 www.massapicom. 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.