Package com.android.dx.util

Examples of com.android.dx.util.ExceptionWithContext


        for (int i = 0; i < count; i++) {
            try {
                Section one = sections[i];
                int zeroCount = one.getFileOffset() - out.getCursor();
                if (zeroCount < 0) {
                    throw new ExceptionWithContext("excess write of " +
                            (-zeroCount));
                }
                out.writeZeroes(one.getFileOffset() - out.getCursor());
                one.writeTo(out);
            } catch (RuntimeException ex) {
                ExceptionWithContext ec;
                if (ex instanceof ExceptionWithContext) {
                    ec = (ExceptionWithContext) ex;
                } else {
                    ec = new ExceptionWithContext(ex);
                }
                ec.addContext("...while writing section " + i);
                throw ec;
            }
        }

        if (out.getCursor() != fileSize) {
View Full Code Here


     * @param idx the bad cpi
     * @return never
     * @throws ExceptionWithContext always thrown
     */
    private static Constant throwInvalid(int idx) {
        throw new ExceptionWithContext("invalid constant pool index " +
                                       Hex.u2(idx));
    }
View Full Code Here

TOP

Related Classes of com.android.dx.util.ExceptionWithContext

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.