Examples of InterpreterException


Examples of abstrasy.interpreter.InterpreterException

    return Node.createExternal(except);
  }
 
  public static Node create(Exception ex) throws Exception {
    if(ex instanceof InterpreterException){
      InterpreterException iex = (InterpreterException)ex;
      return create(iex.getErrCode(),iex.getMessage(),iex.getMessageExt());
    }
    else{
    return create(StdErrors.Unknown_error.getErr(),StdErrors.Unknown_error.getMsg(),new Node(ex.getMessage()));   
    }
  }
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

    t.etype=this.etype;
    return t;
  }
 
  public void raise() throws Exception{
    throw new InterpreterException(this.err,this.etype,this.emsg);
  }
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

        }
        else if (startAt.size() == 2) {
            objet = startAt.elementAt(1);
        }
        else {
            throw new InterpreterException(StdErrors.Argument_count_mismatch);
        }
        return null;
    }
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

        else {
            if (startAt.size() == 2) {
                // contient un vecteur de références
                Node vector = startAt.getSubNode(1, Node.TYPE_CLIST);
                if (vector.indexOf(objet) >= 0)
                    throw new InterpreterException(StdErrors.Circulare_reference);
                if (!objet.isNodeType(Node.VTYPE_BY_VALUE))
                    vector.addElement(objet);
                res = AExtTools.createNewExpr(
                          Node.createSymbol("Object"),
                          Node.createLazy().append(AExtTools.createSExpression(":set!", new Node[] { objet.toSerialized(vector) }))
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

                case Node.TYPE_EXTERNAL:
                    return ExternalTK.getExternalSlots(self);
                case Node.TYPE_FUNCTION:
                    return Function.TK.getSlots(self);
                default:
                    throw new InterpreterException(StdErrors.extend(StdErrors.Delegable_object_required, self.toString()));
            }
        }
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

                        if (self.isNamespace()) {
                            ContextualCall ccall = ContextualCall.createContextualCall(self, symbol);
                            if (ccall != null)
                                return ccall.call(argv);
                            else
                                throw new InterpreterException(StdErrors.extend(StdErrors.Symbol_not_defined, symbol));

                        }
                        else
                            throw new InterpreterException(StdErrors.Internal_error);
                    }
                case Node.TYPE_EXTERNAL:
                    {
                        Node extargs = Node.createCList_().append_(Node.createQSymbol(symbol));
                        if (argv != null)
                            extargs.appendChildsOf(argv);
                        return ExternalTK.evalMethod(self, extargs);
                    }
                case Node.TYPE_FUNCTION:
                    {
                        Node expr = new Node().append(self).append_(Node.createQSymbol(PCoder.unselfing(symbol)));
                        if (argv != null)
                            expr.appendChildsOf(argv);
                        return expr.exec_q(false);
                    }
                default:
                    throw new InterpreterException(StdErrors.extend(StdErrors.Delegable_object_required, self.toString()));
            }
        }
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

                            ContextualCall ccall = ContextualCall.createContextualCall(self, symbol);
                            if (ccall != null)
                                return ccall.call_unary(arg0);

                            else
                                throw new InterpreterException(StdErrors.extend(StdErrors.Symbol_not_defined, symbol));

                        }
                        else
                            throw new InterpreterException(StdErrors.Internal_error);
                    }
                case Node.TYPE_EXTERNAL:
                    {
                        Node extargs = Node.createCList_().append_(Node.createQSymbol(symbol));
                        if (arg0 != null)
                            extargs.addElement_(arg0);
                        return ExternalTK.evalMethod(self, extargs);
                    }
                case Node.TYPE_FUNCTION:
                    {
                        Node expr = new Node().append(self).append_(Node.createQSymbol(PCoder.unselfing(symbol)));
                        if (arg0 != null)
                            expr.append(arg0);
                        return expr.exec_q(false);
                    }
                default:
                    throw new InterpreterException(StdErrors.extend(StdErrors.Delegable_object_required, self.toString()));
            }
        }
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

                        }
                        else
                            return null;
                    }
                default:
                    throw new InterpreterException(StdErrors.extend(StdErrors.Delegable_object_required, self.toString()));
            }
        }
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

                        }
                        else
                            return null;
                    }
                default:
                    throw new InterpreterException(StdErrors.extend(StdErrors.Delegable_object_required, self.toString()));
            }
        }
View Full Code Here

Examples of abstrasy.interpreter.InterpreterException

                        }
                        else
                            return null;
                    }
                default:
                    throw new InterpreterException(StdErrors.extend(StdErrors.Delegable_object_required, self.toString()));
            }
        }
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.