Package nexj.core.scripting

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


                           {
                              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

TOP

Related Classes of nexj.core.scripting.ScriptingException

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.