Examples of ScriptingException


Examples of nexj.core.scripting.ScriptingException

   {
      Event event = (Event)getSelector(sName).getMember((args != null) ? args.length : 0);

      if (!event.isStatic())
      {
         throw new ScriptingException("err.scripting.staticEvent", new Object[]{sName, getName()});
      }

      return event.invoke(this, args, ThreadContextHolder.getContext().getMachine());
   }
View Full Code Here

Examples of nexj.core.scripting.ScriptingException

   {
      Event event = (Event)getSelector(sName).getMember(Pair.length(args));

      if (!event.isStatic())
      {
         throw new ScriptingException("err.scripting.staticEvent", new Object[]{sName, getName()});
      }

      return event.invoke(this, args, ThreadContextHolder.getContext().getMachine());
   }
View Full Code Here

Examples of nexj.core.scripting.ScriptingException

                     setValue(((Attribute)member).getOrdinal(), value);
                     machine.returnValue(value, nArgCount);
                  }
                  else
                  {
                     throw new ScriptingException("err.scripting.maxArgCount",
                        new Object[]{toString(),
                           Primitive.ONE_INTEGER,
                           Primitive.createInteger(nArgCount - 1)});
                  }

                  return false;
               }
               else
               {
                  machine.setArg(0, nArgCount, this);

                  if (m_logger.isDebugEnabled())
                  {
                     ((Event)member).dump(nArgCount, machine);
                  }

                  return ((Event)member).getFunction().invoke(nArgCount, machine);
               }
            }
            else
            {
               try
               {
                  return machine.invokeJavaMethod(this, nArgCount);
               }
               catch (ScriptingException e)
               {
                  if ("err.scripting.unknownMethod".equals(e.getErrorCode()))
                  {
                     throw new ScriptingException(
                        (member.isAttribute()) ?
                           "err.scripting.staticAttribute" :
                           "err.scripting.staticEvent",
                        new Object[]{sym, getName()});
                  }

                  throw e;
               }
            }
         }
      }
      else
      {
         throw new ScriptingException("err.scripting.minArgCount",
            new Object[]{getName(),
               Primitive.ONE_INTEGER,
               Primitive.createInteger(nArgCount)});
      }

      throw new ScriptingException("err.scripting.funCall");
   }
View Full Code Here

Examples of nexj.core.scripting.ScriptingException

                           {
                              Member member = clazz.getSelector(pair.getHead().toString()).getMember(nArgCount);

                              if (!member.isStatic())
                              {
                                 throw new ScriptingException(
                                    (member.isAttribute()) ?
                                       "err.scripting.staticAttribute" :
                                       "err.scripting.staticEvent",
                                    new Object[]{member.getName(), clazz.getName()});
                              }
View Full Code Here

Examples of org.apache.ibatis.scripting.ScriptingException

      return srtValue;
    }

    private void checkInjection(String value) {
      if (injectionFilter != null && !injectionFilter.matcher(value).matches()) {
        throw new ScriptingException("Invalid input. Please conform to regex" + injectionFilter.pattern());
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.