Package org.apache.commons.lang.exception

Examples of org.apache.commons.lang.exception.NestableRuntimeException


                J2DoPrivHelper.newInstanceAction(cls));
        } catch (Exception e) {
            if (e instanceof PrivilegedActionException) {
                e = ((PrivilegedActionException) e).getException();  
            }
            RuntimeException re = new NestableRuntimeException(_loc.get
                ("obj-create", cls).getMessage(), e);
            if (fatal)
                throw re;
            Log log = (conf == null) ? null : conf.getConfigurationLog();
            if (log != null && log.isErrorEnabled())
View Full Code Here


        Context ctx = null;
        try {
            ctx = new InitialContext();
            return ctx.lookup(name);
        } catch (NamingException ne) {
            throw new NestableRuntimeException(
                _loc.get("naming-err", name).getMessage(), ne);
        } finally {
            if (ctx != null)
                try { ctx.close(); } catch (Exception e) {}
        }
View Full Code Here

        try {
            return m.invoke(_conn, args);
        } catch (Throwable t) {
            if (t instanceof SQLException)
                throw(SQLException) t;
            throw new NestableRuntimeException(_loc.get("invoke-jdbc3")
                .getMessage(), t);
        }
    }
View Full Code Here

        try {
            Method m = Connection.class.getMethod(name, args);
            _jdbc3.put(key, m);
            return m;
        } catch (Throwable t) {
            throw new NestableRuntimeException(_loc.get("error-jdbc3")
                .getMessage(), t);
        }
    }
View Full Code Here

       
        byte[] ip = null;
        try {
            ip = InetAddress.getLocalHost().getAddress();
        } catch (IOException ioe) {
            throw new NestableRuntimeException(ioe);
        }

        IP = new byte[6];
        RANDOM.nextBytes(IP);
View Full Code Here

            return null;
        if (copy) {
            try {
                copy(bk, file);
            } catch (IOException ioe) {
                throw new NestableRuntimeException(ioe);
            }
        }
        return bk;
    }
View Full Code Here

            return null;
        if (copy) {
            try {
                copy(orig, backup);
            } catch (IOException ioe) {
                throw new NestableRuntimeException(ioe);
            }
        }
        return orig;
    }
View Full Code Here

                J2DoPrivHelper.getCanonicalPathAction(base))).endsWith(pkg))
                file = base;
            else
                file = new File(base, pkg);
        } catch (PrivilegedActionException pae) {
            throw new NestableRuntimeException(
                (IOException) pae.getException());
        } catch (IOException ioe) {
            throw new NestableRuntimeException(ioe);
        }

        if (mkdirs && !(AccessController.doPrivileged(
            J2DoPrivHelper.existsAction(file))).booleanValue())
            AccessController.doPrivileged(J2DoPrivHelper.mkdirsAction(file));
View Full Code Here

        if ("stderr".equals(file))
            return new PrintWriter(System.err);
        try {
            return new FileWriter(getFile(file, loader));
        } catch (IOException ioe) {
            throw new NestableRuntimeException(ioe);
        }
    }
View Full Code Here

            else if ("stderr".equals(file))
                return new PrintWriter(new OutputStreamWriter(System.err, enc));
            else
                return new BufferedWriter(new OutputStreamWriter(getOutputStream(file, loader), enc));
        } catch (IOException ioe) {
            throw new NestableRuntimeException(ioe);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.exception.NestableRuntimeException

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.