Examples of ActionException


Examples of org.b3log.latke.action.ActionException

            pagination.put(Pagination.PAGINATION_PAGE_NUMS, pageNums);

            ret.put(Keys.STATUS_CODE, StatusCodes.GET_COMMENTS_SUCC);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

Examples of org.b3log.latke.action.ActionException

            ret.put(Comment.COMMENTS, comments);
            ret.put(Keys.STATUS_CODE, StatusCodes.GET_COMMENTS_SUCC);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

Examples of org.b3log.latke.action.ActionException

            ret.put(Comment.COMMENTS, comments);
            ret.put(Keys.STATUS_CODE, StatusCodes.GET_COMMENTS_SUCC);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

Examples of org.b3log.latke.action.ActionException

        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

Examples of org.b3log.latke.action.ActionException

        } catch (final Exception e) {
            if (transaction.isActive()) {
                transaction.rollback();
            }
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

Examples of org.b3log.latke.action.ActionException

            ret.put(Keys.STATUS_CODE, StatusCodes.GET_ARTICLE_SUCC);

            LOGGER.log(Level.FINER, "Got an article[oId={0}]", articleId);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

Examples of org.b3log.latke.action.ActionException

            ret.put(ARTICLES, articles);

            ret.put(Keys.STATUS_CODE, StatusCodes.GET_ARTICLES_SUCC);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, e.getMessage(), e);
            throw new ActionException(e);
        }

        return ret;
    }
View Full Code Here

Examples of org.dmlite.exception.ActionException

   */
  public boolean execute() throws ActionException {
    boolean executed = false;
    if (getSession() == null && getTransaction() == null) {
      String error = "Action must be within a session or within a transaction";
      throw new ActionException(error, this);
    }
    try {
      if (getName().equals("add")) {
        executed = getEntities().add(updateEntity);
      } else if (getName().equals("remove")) {
        executed = getEntities().remove(entity);
      } else if (getName().equals("update")) {
        executed = getEntities().update(entity, updateEntity);
      }
    } catch (ActionException e) {
      log.error("Error in EntitiesAction.execute: " + e.getMessage());
      throw new ActionException(e.getMessage(), this);
    }
    if (executed) {
      setStatus("executed");
      if (getTransaction() == null) {
        DomainModel domainModel = (DomainModel) getSession()
View Full Code Here

Examples of org.ejbca.core.model.services.ActionException

      reciverAddress = properties.getProperty(PROP_RECIEVERADDRESS);
    }
       
    if(reciverAddress == null || reciverAddress.trim().equals("")){
      String msg = intres.getLocalizedMessage("services.mailaction.errorreceiveraddress");
      throw new ActionException(msg);
    }
           
        try {
          MailSender.sendMailOrThrow(senderAddress, Arrays.asList(reciverAddress), MailSender.NO_CC, mailActionInfo.getSubject(), mailActionInfo.getMessage(), MailSender.NO_ATTACHMENTS);
          if (mailActionInfo.isLoggingEnabled()) {
View Full Code Here

Examples of org.ejbca.core.model.services.ActionException

   * @throws ActionException
   */
  private void checkConfig(ActionInfo actionInfo) throws ActionException {
    if(!(actionInfo instanceof MailActionInfo)){
      String msg = intres.getLocalizedMessage("services.mailaction.erroractioninfo");
      throw new ActionException(msg);
    }
    String senderAddress = properties.getProperty(PROP_SENDERADDRESS);
    if(senderAddress == null || senderAddress.trim().equals("")){
      String msg = intres.getLocalizedMessage("services.mailaction.errorsenderaddress");
      throw new ActionException(msg);
    }
  }
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.