Package es.urjc.escet.semium.exceptions

Examples of es.urjc.escet.semium.exceptions.ServerVariableException


                if(s.contains(sv.getTag()))
                    s = s.replace(sv.getTag(),sv.getValue());
            }
           
        } catch (Exception ex) {
            throw new ServerVariableException("Error while inserting Servervariable." + ex.getMessage());
        }
       
        //required params
        while(s.contains("@param:")){
            String name = "";
            int firstDelimiter = s.indexOf("@param:");
            int nextDelimiter = s.indexOf("@",firstDelimiter+1);
            if(nextDelimiter>=0)
                if(ignoreMissingParams)
                    s = s.replace(s.substring(firstDelimiter,nextDelimiter+1),"");
                else{
                name = s.substring(firstDelimiter+7,nextDelimiter);
                throw new ServerVariableException("Parameter '" + name + "' was not supplied");
                } else
                    throw new ServerVariableException("Error while inserting Servervariables: Missing closing '@' in at least one '@param:' tag");
        }
        //optional params. Leave blank if not supplied
        while(s.contains("@optionalparam:")){
            String name = "";
            int firstDelimiter = s.indexOf("@optionalparam:");
View Full Code Here


            ServerVariable sv = (ServerVariable)i.next();
            if(sv.getTag().compareTo(tag)==0)
                return sv;
        }
        //Variable was not found, raise exeption
        throw new ServerVariableException("ServerVariable " + tag + "could not be found in current context");
    }
View Full Code Here

TOP

Related Classes of es.urjc.escet.semium.exceptions.ServerVariableException

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.