Package org.apache.commons.lang.exception

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


        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


                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

            Object result = ctx.lookup(name);
            if (result == null && log != null && log.isWarnEnabled())
              log.warn(_loc.get("jndi-lookup-failed", userKey, name));
            return result;
        } 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

                J2DoPrivHelper.existsAction(file))).booleanValue()) {
                Collection col = getFromMetaDataFile(file);
                return (String[]) col.toArray(new String[col.size()]);
            }
        } catch (Exception e) {
            throw new NestableRuntimeException(
                _loc.get("class-arg", arg).getMessage(), e);
        }

        // must be a class name
        return new String[]{ arg };
View Full Code Here

            while (itr.hasNext()) {
                source = itr.next();
                appendTypeNames(source, itr.getInputStream(), names);
            }
        } catch (Exception e) {
            throw new NestableRuntimeException(
                _loc.get("class-arg", source).getMessage(), e);
        }
        return (String[]) names.toArray(new String[names.size()]);
    }
View Full Code Here

                    map.put(source, (String[]) names.toArray
                        (new String[names.size()]));
                names.clear();
            }
        } catch (Exception e) {
            throw new NestableRuntimeException(
                _loc.get("class-arg", source).getMessage(), e);
        }
        return map;
    }
View Full Code Here

                    stmt.close();
                    conn.close();
                }
                catch (Exception e)
                {
                    throw new NestableRuntimeException(e);
                }
            }
        }
View Full Code Here

                        out.write((char) value);
                        unicode.setLength(0);
                        inUnicode = false;
                        hadSlash = false;
                    } catch (NumberFormatException nfe) {
                        throw new NestableRuntimeException("Unable to parse unicode value: " + unicode, nfe);
                    }
                }
                continue;
            }
            if (hadSlash) {
View Full Code Here

        }
        catch ( NamingException e )
        {
            e.printStackTrace();

            throw new NestableRuntimeException( e );
        }

        list.add( attributes );
    }
View Full Code Here

            if (context.getLocalLibrary() != null && configElm.hasAttribute("extends")) {
                try {
                    context.setSuperBinding(context.getLocalLibrary().getBinding(configElm.getAttribute("extends")));
                } catch (LibraryException e) {
                    // throw new RuntimeException("Error extending binding! (at "+DomHelper.getLocation(configElm)+")", e);
                    throw new NestableRuntimeException("Error extending binding! (at " + DomHelper.getLocation(configElm) + ")", e);
                }
            } else {
                context.setSuperBinding(null);
            }
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.