Package org.apache.imperius.spl.parser.exceptions

Examples of org.apache.imperius.spl.parser.exceptions.SPLException


            {
               logger.severe(Thread.currentThread().getName()+" "
                   +"validation error: wrong data type passed in "
                       + this._dataType);
              
               throw new SPLException(Messages.getString(
            "SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
            }
        }
       
        this._dataType.copy(this._exp.getType());
View Full Code Here


        Object avrgInCollection = null;
        Object expResult = this._exp.evaluate();
        if (!(expResult instanceof java.util.List))
        {
            logger.severe(Thread.currentThread().getName()+" "+"result of expression is not of type List");
            throw new SPLException(Messages.getString(
          "SPL_PASSED_EXPRESSION_TYPE_ERROR_MSG",
          new Object[] { "","is not", "List" }));
        }
        ArrayList resultArray = (ArrayList) expResult;
        Integer size = new Integer(resultArray.size());
        //System.out.println("resultArray size " + resultArray.size() + " to string " + resultArray.toString());
        if ((resultArray != null) && (!resultArray.isEmpty()))
        {
            Iterator resultIt = resultArray.iterator();
            while (resultIt.hasNext())
            {
                Object resultObject = resultIt.next();
                //System.out.println("resultObject,class " + resultObject + " " + resultObject.getClass());
                if (avrgInCollection == null)
                {
                    avrgInCollection = resultObject;
                }
                else
                {
                    //System.out.println("Adding resultObject to sum  "+ resultObject + "  " + avrgInCollection);
                    avrgInCollection = ExpressionUtility.plus(
                            (Number) avrgInCollection, (Number) resultObject);
                }
                //System.out.println("current sum is " + avrgInCollection);
            }
            //System.out.println("sum ,Array size " + avrgInCollection + " " + size);
            avrgInCollection = ExpressionUtility.division(
                    (Number) avrgInCollection, (Number) size);
            //System.out.println("AvrgInCollection=" + avrgInCollection);
            logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "evaluate");
           
            return avrgInCollection;
        }
        else
        {
            logger.severe(Thread.currentThread().getName()+" "+"result Array is empty");
            throw new SPLException(Messages.getString(
          "SPL_BLANK_EXPRESSION_PASSED_ERROR_MSG",
          new Object[] { "" }));
        }
       
    }
View Full Code Here

            if (!validate())
            {
                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
                        + " has wrong data type passed in.");
               
                throw new SPLException(Messages.getString(
              "SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
            }
        }
        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "NotEqual");
       
View Full Code Here

        }
        catch (Exception e)
        {
            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
           
            throw new SPLException(Messages.getString(
          "SPL_EVALUATION_ERROR_MSG", new Object[] { e
              .getLocalizedMessage() }));

        }
    }
View Full Code Here

            if (!validate())
            {
                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
                        + " has wrong data type passed in.");
               
                throw new SPLException(Messages.getString(
              "SPL_VALIDATION_ERROR_MSG", new Object[] { className }));
            }
        }
        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "Mod");
       
View Full Code Here

        }
        catch (Exception e)
        {
            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
           
            throw new SPLException(Messages.getString(
          "SPL_EVALUATION_ERROR_MSG", new Object[] { e
              .getLocalizedMessage() }));

        }
    }
View Full Code Here

        }
        else
        {
            logger.severe(Thread.currentThread().getName()+" "+"Illegal argument type.");
           
            throw new SPLException(Messages.getString("SPL_WRONG_OPERAND_TYPE_EXCEPTION_MSG"));
        }
    }
View Full Code Here

        }
        catch (Exception e)
        {
            logger.severe(Thread.currentThread().getName()+" "+"evaluation errro: " + e.toString());
           
            throw new SPLException(Messages.getString(
          "SPL_EVALUATION_ERROR_MSG", new Object[] { e
              .getLocalizedMessage() }));

        }
    }
View Full Code Here

            if (!validate())
            {
                logger.severe(Thread.currentThread().getName()+" "+"validation error: " + className
                        + " has wrong data type passed in.");
               
                throw new SPLException(Messages.getString(
              "SPL_VALIDATION_ERROR_MSG", new Object[] { className}));
            }
        }
        logger.exiting(sourceClass,Thread.currentThread().getName()+" "+ "EndsWith");
       
View Full Code Here

        }
        catch (Exception e)
        {
            logger.severe(Thread.currentThread().getName()+" "+"evaluation error: " + e.toString());
           
            throw new SPLException(Messages.getString(
          "SPL_EVALUATION_ERROR_MSG", new Object[] { e
              .getLocalizedMessage() }));

        }
    }
View Full Code Here

TOP

Related Classes of org.apache.imperius.spl.parser.exceptions.SPLException

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.