Package org.jnode.configure

Examples of org.jnode.configure.ConfigureException


            // The format must actually be a class name ...
            try {
                Class<?> clazz = Class.forName(fileFormat);
                return (FileAdapter) clazz.newInstance();
            } catch (Exception ex) {
                throw new ConfigureException("Problem instantiating FileAdapter class '" +
                        fileFormat + "': " + ex.getMessage(), ex);
            }
        }
    }
View Full Code Here


            } catch (FileNotFoundException ex) {
                // Fall back to the builtin default property values
                configure.debug("Taking initial values for the '" + file +
                        "' properties from the builtin defaults.");
            } catch (IOException ex) {
                throw new ConfigureException("Problem loading properties from '" + file + "'.", ex);
            } finally {
                if (in != null) {
                    try {
                        in.close();
                    } catch (IOException ex) {
View Full Code Here

                        "Expanded by JNode 'configure' tool");
            } else {
                try {
                    is = new FileInputStream(templateFile);
                } catch (FileNotFoundException ex) {
                    throw new ConfigureException("Cannot read template file", ex);
                }
                expandToTemplate(properties, is, os, propSet.getMarker(), templateFile);
            }
        } catch (IOException ex) {
            throw new ConfigureException("Cannot save properties to '" + toFile + "'.", ex);
        } finally {
            if (os != null) {
                try {
                    os.close();
                } catch (IOException ex) {
View Full Code Here

                if (ch == marker) {
                    StringBuffer sb = new StringBuffer(20);
                    while ((ch = r.read()) != marker) {
                        switch (ch) {
                            case -1:
                                throw new ConfigureException("Encountered EOF in a " + marker +
                                        "..." + marker + " sequence: at " + file +
                                        " line " + lineNo);
                            case '\r':
                            case '\n':
                                throw new ConfigureException("Encountered end-of-line in a " +
                                        marker + "..." + marker + " sequence: at " + file +
                                        " line " + lineNo);
                            default:
                                sb.append((char) ch);
                        }
                    }
                    if (sb.length() == 0) {
                        w.write(marker);
                    } else {
                        Matcher matcher = AT_AT_CONTENTS_PATTERN.matcher(sb);
                        if (!matcher.matches()) {
                            throw new ConfigureException("Malformed @...@ sequence: at " + file +
                                    " line " + lineNo);
                        }
                        String name = matcher.group(1);
                        String modifiers = matcher.group(2);
                        modifiers = (modifiers == null) ? "" : modifiers;
View Full Code Here

TOP

Related Classes of org.jnode.configure.ConfigureException

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.