Package com.philip.journal.core.exception

Examples of com.philip.journal.core.exception.JournalException


                        + "].", ite));
            } catch (final NoSuchMethodException nsme) {
                throw JournalException.wrapperException(new IllegalArgumentException("Invalid parameter value type["
                        + obj + "]", nsme));
            } catch (final Exception e) {
                throw new JournalException("System Error [" + key + "," + obj + "]", e);
            }
        }
        E retval = null;
        try {
            retval = (E) query.uniqueResult();
View Full Code Here


        try {
            return (T) criteria.getClass().getMethod(methodName, new Class[0])
                    .invoke(criteria, new Object[0]);
        } catch (final Exception e) {
            if (e.getCause() instanceof NonUniqueResultException) {
                throw new JournalException(e.getCause().getMessage(), e.getCause()); // NOPMD by r39 on 3/30/11 12:07 PM
            } else if (e.getCause() instanceof QueryException) {
                throw JournalException.wrapperException(new IllegalArgumentException(Messages.Error.IAE_INVALID_PROP
                        + param.keySet(), e
                        .getCause()));
            } else if (e.getCause() instanceof ClassCastException) {
                throw new IllegalArgumentException(Messages.Error.IAE_TYPE_MISMATCH, e.getCause()); // NOPMD by r39 on 3/30/11 12:07 PM
            } else {
                if (InvocationTargetException.class.equals(e.getClass())) {
                    final InvocationTargetException ite = (InvocationTargetException) e;
                    final String errorMessage = ite.getTargetException().getMessage();
                    throw new JournalException(errorMessage, ite);//NOPMD we want to wrap original stack trace.
                } else {
                    throw new JournalException(Messages.Error.SYSTEM_ERROR, e);
                }
            }
        }
    }
View Full Code Here

                            BeanUtils.getPropertyType(entry, property), property);
                    if (val != null) {
                        try {
                            org.apache.commons.beanutils.BeanUtils.setProperty(entry, property, val);
                        } catch (final Exception e) {
                            throw new JournalException(e.getMessage(), e);
                        }
                    }
                }
                if (null == entryDao.readByTitle(entry.getTitle(), subListParent.getBranchId())) {
                    entry.setBranch(subListParent);
View Full Code Here

                    property);
            if (val != null) {
                try {
                    org.apache.commons.beanutils.BeanUtils.setProperty(targetBranch, property, val);
                } catch (final Exception e) {
                    throw new JournalException(e.getMessage(), e);
                }
            }
        }

        targetBranch.setParent(parent);
View Full Code Here

    @Override
    public void execute() throws ServletException, IOException {
        // TODO:
        try {
            throw new JournalException("TODO", null);
        } catch (final JournalException e) {
            getLogger().debug(e.getMessage(), e);
            getResponseHandler().respondFail(getHttpServletResponse(), e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of com.philip.journal.core.exception.JournalException

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.