Package org.boris.xlloop

Examples of org.boris.xlloop.RequestException


    public XLoper execute(IFunctionContext context, String name, XLoper[] args) throws RequestException {
        try {
            return ((RequestExecutor) iterator.next()).execute(name, args);
        } catch (IOException e) {
            throw new RequestException(e);
        }
    }
View Full Code Here


    Object execute(Object[] args) throws RequestException {
        try {
            return method.invoke(instance, (Object[]) args);
        } catch (IllegalArgumentException e) {
            throw new RequestException(e);
        } catch (IllegalAccessException e) {
            throw new RequestException(e);
        } catch (InvocationTargetException e) {
            throw new RequestException(e.getTargetException());
        }
    }
View Full Code Here

            LispValue result = jatha.eval(inValue);
            XLoper outValue = makeResult(result);
            return outValue;
        } catch (Exception e) {
            e.printStackTrace();
            throw new RequestException(e);
        }
    }
View Full Code Here

        try {
            return (XLoper) method.invoke(object, new Object[] { args });
        } catch (Exception e) {
            if (e instanceof RequestException)
                throw (RequestException) e;
            throw new RequestException(e);
        }
    }
View Full Code Here

            if (h.hasFunction(name)) {
                return h.execute(context, name, args);
            }
        }

        throw new RequestException("#Unknown function: " + name);
    }
View Full Code Here

    }

    public XLoper execute(IFunctionContext context, String name, XLoper[] args) throws RequestException {
        IFunction f = (IFunction) scripts.get(name);
        if (f == null) {
            throw new RequestException("#Unknown script: " + name);
        }
        return f.execute(context, args);
    }
View Full Code Here

            manager.declareBean("context", a, IFunctionContext.class);
            manager.declareBean("args", a, Object[].class);
            Object res = manager.eval(lang, name, 1, 1, source);
            return converter.createFrom(res);
        } catch (Throwable e) {
            throw new RequestException(e);
        }
    }
View Full Code Here

    }

    public XLoper execute(IFunctionContext context, String name, XLoper[] args) throws RequestException {
        IFunction f = (IFunction) methods.get(name);
        if (f == null) {
            throw new RequestException("#Unknown method: " + name);
        }
        return f.execute(context, args);
    }
View Full Code Here

            Scriptable argsObj = ctx.newArray(so, oargs);
            so.defineProperty("args", argsObj, ScriptableObject.DONTENUM);
            try {
                return converter.createFrom(script.exec(ctx, so));
            } catch (Throwable t) {
                throw new RequestException(t.getMessage());
            }
        }
View Full Code Here

        }

        if (matched != null)
            return matched.execute(context, args);

        throw new RequestException("#Invalid args");
    }
View Full Code Here

TOP

Related Classes of org.boris.xlloop.RequestException

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.