Package abstrasy.interpreter

Examples of abstrasy.interpreter.InterpreterException


            catch (Exception ex) {
                Interpreter.Log(ex.getMessage());
                if (Interpreter.isDebugMode()) {
                    ex.printStackTrace();
                }
                throw new InterpreterException(StdErrors.Resource_error);
            }
        }
    }
View Full Code Here


    public void setInterThreadException(Exception ex, Interpreter interThrd) {
        if (Interpreter.isDebugMode()) {
            ex.printStackTrace();
        }
        interThreadException = new InterpreterException(StdErrors.createTrace(interThrd, ex));
    }
View Full Code Here

                }
                /*
                 * Si c'est le cas aussi, alors nous sommes inter-bloqués...
                 */
                if (hasA && hasR) {
                    throw new InterpreterException(StdErrors.Deadlock_error);
                }
            }
        }
        /*
         * sinon, pas de problème....
View Full Code Here

        if (!pendingMsg.isEmpty()) {
            if (!threadMessages.addAll(pendingMsg)) {
                /*
                 * Si le ou les messages ne peuvent être ajoutés, une exception doit être produite...
                 */
                throw new InterpreterException(StdErrors.Internal_error);
            }
        }
        pendingMsg = old;
    }
View Full Code Here

    public void pendingMsg_POSTPONE(Node message) throws Exception {
        if (!pendingMsg.add(message)) {
            /*
             * Si le message ne peut être ajouté, une exception doit être produite...
             */
            throw new InterpreterException(StdErrors.Internal_error);
        }
    }
View Full Code Here

        if (breakingFromSEMAPHORE) {
            // fin Breaking...
            if (timeOutTimer.isRunning()) {
                timeOutTimer.stop();
            }
            throw new InterpreterException(StdErrors.Breaking_exception);
        }

        if (timeOutRaising) {
            // fin TimeOut Raising...
            if (timeOutTimer.isRunning()) {
                timeOutTimer.stop();
            }
            timeOutCheck = false;
            timeOutRaising = false;

            throw new InterpreterException(StdErrors.Timed_expired_exception);
        }

        if (endingFromSEMAPHORE || threadStop) {
            // fin silencieuse
            if (timeOutTimer.isRunning()) {
View Full Code Here

                timeOutTimer.stop();
            }
           
        }
        catch (RestartException talex) {
            throw new InterpreterException(StdErrors.createTrace(talex.getFrom(), new InterpreterException(StdErrors.Restart_error)));
        }
        catch (RetryException retryex) {
            throw new InterpreterException(StdErrors.createTrace(retryex.getFrom(), new InterpreterException(StdErrors.Retry_error)));
        }
        catch (AbortException abortex) {
            throw new InterpreterException(StdErrors.createTrace(abortex.getFrom(), new InterpreterException(StdErrors.Retry_error)));
        }
        catch (Exception e) {
            System.setProperty("java.class.path", oClass_path);
            throw e;
        }
View Full Code Here

        SELF.require_SELF_mutable();
        int p = (int)startAt.getSubNode(1, Node.TYPE_NUMBER).getNumber();
        /*
         * la précision doit être >= 0...
         */
        if(p<0) throw new InterpreterException(StdErrors.extend(StdErrors.Out_of_range, "precision "+p+" must be >= 0" ));
        BigDecimal r=number.get();
        int digits=r.precision()-r.scale();
        MathContext mc=context.get();
        MathContext nmc = new MathContext(digits<0 ? p+1 : p + digits, mc.getRoundingMode()); // more precision...
        context.getAndSet( nmc );                 
View Full Code Here

     * @throws Exception
     */
    public Node external_precision(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(2);
        int c=(int)startAt.getSubNode(1, Node.TYPE_NUMBER).getNumber();
        if(c<0) throw new InterpreterException(StdErrors.extend(StdErrors.Out_of_range, "precision "+c+" must be >= 0" ));
        BigDecimal r=number.get();
        int digits=r.precision()-r.scale();
        MathContext mc=context.get();
        MathContext nmc = new MathContext(digits<0 ? c+1 : c + digits, mc.getRoundingMode()); // more precision...
        return Node.createExternal(new External_Decimal(number.get().round(nmc),nmc));
View Full Code Here

     * @throws Exception
     */
    public Node external_mutator_precision(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(2);
        int c=(int)startAt.getSubNode(1, Node.TYPE_NUMBER).getNumber();
        if(c<0) throw new InterpreterException(StdErrors.extend(StdErrors.Out_of_range, "precision "+c+" must be >= 0" ));
        BigDecimal r=number.get();
        int digits=r.precision()-r.scale();
        MathContext mc=context.get();
        context.getAndSet( new MathContext(digits<0 ? c+1 : c + digits, mc.getRoundingMode()) );
        number.getAndSet(number.get().round(context.get()));
View Full Code Here

TOP

Related Classes of abstrasy.interpreter.InterpreterException

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.