Package org.asteriskjava.config

Examples of org.asteriskjava.config.ConfigParseException


        if(
                (line.trim().startsWith("exten") || line.trim().startsWith("include")) &&
                currentCategory != null &&
                (currentCategory.getName().equals("general") || currentCategory.getName().equals("globals"))
        )
            throw new ConfigParseException(configfile, lineno, "cannot have 'exten' or 'include' in global or general sections");

       
        /*
         * Goal here is to break out anything unique that we might want to
         * look at and parse separately. For now, only exten and include fit
View Full Code Here


    protected ConfigExtension parseExtension(String configfile, int lineno, String line) throws ConfigParseException
    {
        ConfigVariable initialVariable = parseVariable(configfile, lineno, line);
       
        if(!initialVariable.getName().equals("exten"))
            throw new ConfigParseException(configfile, lineno, "missing 'exten' near " + line);
        line = initialVariable.getValue().trim();

        int nameIndex = line.indexOf(",", 0);
        if(nameIndex == -1)
            throw new ConfigParseException(configfile, lineno, "missing extension name near " + line);
        String name = line.substring(0, nameIndex);
        line = line.substring(name.length()+1, line.length()).trim();
       
        int priorityDelimiter = line.indexOf(",", 0);
        if(priorityDelimiter == -1)
            throw new ConfigParseException(configfile, lineno, "missing extension priority near " + line);
        String priority = line.substring(0, priorityDelimiter);
        line = line.substring(priority.length()+1, line.length()).trim();

        String [] application = harvestApplicationWithArguments(line);
       
View Full Code Here

TOP

Related Classes of org.asteriskjava.config.ConfigParseException

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.