Examples of VMExceptionInstance


Examples of org.perl6.nqp.sixmodel.reprs.VMExceptionInstance

    /* Exception related. */
    public static void die_s_c(String msg, ThreadContext tc) {
        // Construct exception object.
        SixModelObject exType = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.exceptionType;
        VMExceptionInstance exObj = (VMExceptionInstance)exType.st.REPR.allocate(tc, exType.st);
        exObj.message = msg;
        exObj.category = ExceptionHandling.EX_CAT_CATCH;
        exObj.origin = tc.curFrame;
        exObj.nativeTrace = (new Throwable()).getStackTrace();
        ExceptionHandling.handlerDynamic(tc, ExceptionHandling.EX_CAT_CATCH, true, exObj);
View Full Code Here

Examples of org.perl6.nqp.sixmodel.reprs.VMExceptionInstance

            throw ExceptionHandling.dieInternal(tc, "backtrace needs an object with VMException representation");
        }
    }
    public static void _throw_c(SixModelObject obj, ThreadContext tc) {
        if (obj instanceof VMExceptionInstance) {
            VMExceptionInstance ex = (VMExceptionInstance)obj;
            ex.origin = tc.curFrame;
            ex.nativeTrace = (new Throwable()).getStackTrace();
            ExceptionHandling.handlerDynamic(tc, ex.category, false, ex);
        }
        else {
View Full Code Here

Examples of org.perl6.nqp.sixmodel.reprs.VMExceptionInstance

            return;

        if (uwex instanceof UnwindException) {
            if (uwex.payload.hashCode() == where.hashCode())
                return;
            VMExceptionInstance vmex = (VMExceptionInstance)newexception(tc);
            /* We're moving to the outside so we do not rethrow to us. */
            vmex.category = uwex.category;
            vmex.payload = uwex.payload;
            tc.curFrame.curHandler = outerHandler;
            ExceptionHandling.handlerDynamic(tc, vmex.category, false, vmex);
View Full Code Here

Examples of org.perl6.nqp.sixmodel.reprs.VMExceptionInstance

        if ((uwex.category & ExceptionHandling.EX_CAT_LABELED) == 0)
            return;

        if (uwex instanceof UnwindException) {
            /* We're moving to the outside so we do not rethrow to us. */
            VMExceptionInstance vmex = (VMExceptionInstance)newexception(tc);
            vmex.category = uwex.category;
            vmex.payload = uwex.payload;
            tc.curFrame.curHandler = outerHandler;
            ExceptionHandling.handlerDynamic(tc, vmex.category, false, vmex);
        }
View Full Code Here

Examples of org.perl6.nqp.sixmodel.reprs.VMExceptionInstance

            throw ExceptionHandling.dieInternal(tc, "_is_same_label needs an object with UnwindException representation");
        }
    }
    public static void rethrow_c(SixModelObject obj, ThreadContext tc) {
        if (obj instanceof VMExceptionInstance) {
            VMExceptionInstance ex = (VMExceptionInstance)obj;
            ExceptionHandling.handlerDynamic(tc, ex.category, false, ex);
        }
        else {
            throw ExceptionHandling.dieInternal(tc, "rethrow needs an object with VMException representation");
        }
View Full Code Here

Examples of org.perl6.nqp.sixmodel.reprs.VMExceptionInstance

     * handler model. Note the exception is not resumable. */
    private static RuntimeException stooge = new RuntimeException("Stooge exception leaked");
    private static ThreadDeath death = new ThreadDeath();
    private static RuntimeException dieInternal(ThreadContext tc, String msg, Throwable t) {
        SixModelObject exType;
        VMExceptionInstance exObj;
        if (tc.gc.noisyExceptions) {
            if (t == null) t = new Throwable(msg);
            t.printStackTrace();
        }
        try {
View Full Code Here

Examples of org.perl6.nqp.sixmodel.reprs.VMExceptionInstance

        if (exObj != null && exObj.message != null)
            message.append("Unhandled exception: " + exObj.message + "\n");
        else
            message.append("Unhandled exception; category = " + category + "\n");

        exObj = new VMExceptionInstance();
        exObj.origin = tc.curFrame;
        exObj.nativeTrace = (new Throwable()).getStackTrace();

        for (String line : backtraceStrings(exObj)) {
            message.append(line);
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.