Examples of addError()


Examples of org.apache.maven.continuum.xmlrpc.project.AddingResult.addError()

        if ( result.hasErrors() )
        {
            for ( String error : result.getErrors() )
            {
                res.addError( error );
            }
        }

        if ( result.getProjects() != null )
        {
View Full Code Here

Examples of org.apache.openejb.webapp.common.Alerts.addError()

            return;
        }
        File webXmlFile = new File(confDir, "web.xml");
        if (webXmlFile.exists()) {
            if (!webXmlFile.delete()) {
                alerts.addError("can't replace web.xml");
            }
        }
        String webXml = Installers.readEntry(openejbTomcatCommonJar, "conf/web.xml", alerts);
        if (Installers.writeAll(webXmlFile, webXml, alerts)) {
            alerts.addInfo("Set jasper in production mode in TomEE web.xml");
View Full Code Here

Examples of org.apache.pdfbox.preflight.ValidationResult.addError()

    }

    @Test
    public void testOneError () throws Exception {
        ValidationResult result = new ValidationResult(false);
        result.addError(new ValidationResult.ValidationError("7"));
        parser.createResponseWithError(document, "pdftype", result, preflight);
        Assert.assertNotNull(xpath.evaluate("errors[@count='1']", preflight, XPathConstants.NODE));
        NodeList nl = (NodeList)xpath.evaluate("errors/error[@count='1']", preflight, XPathConstants.NODESET);
        Assert.assertEquals(1,nl.getLength());
    }
View Full Code Here

Examples of org.apache.roller.weblogger.util.RollerMessages.addError()

                RollerMessages errors = new RollerMessages();
                fileMgr.createMediaFile(website, mf, errors);
                try {
                    resource.getInputStream().close();
                } catch (IOException ex) {
                    errors.addError("error.closingStream");
                    log.debug("ERROR closing inputstream");
                }
                if (errors.getErrorCount() > 0) {
                    throw new WebloggerException(errors.toString());
                }
View Full Code Here

Examples of org.apache.struts.util.ErrorMessages.addError()

  String username = ((LogonForm) form).getUsername();
  String password = ((LogonForm) form).getPassword();
  Hashtable database = (Hashtable)
    servlet.getServletContext().getAttribute(Constants.DATABASE_KEY);
  if (database == null)
      errors.addError("error.database.missing");
  else {
      user = (User) database.get(username);
      if ((user != null) && !user.getPassword().equals(password))
    user = null;
      if (user == null)
View Full Code Here

Examples of org.apache.struts2.Messages.addError()

public class MessagesTest extends TestCase {

    public void testForField() {
        Messages messages = new MessagesImpl();
        Messages fieldMessages = messages.forField("foo");
        fieldMessages.addError("foo");
        assertFalse(fieldMessages.getErrors().isEmpty());
        assertTrue(messages.hasErrors());
    }

    public void testHasMessagesForSeverity() {
View Full Code Here

Examples of org.auraframework.impl.javascript.controller.JavascriptPseudoAction.addError()

            JavascriptPseudoAction action = null;
            try {
                action = (JavascriptPseudoAction) Aura.getInstanceService().getInstance(desc,
                        ActionDef.class);
                action.setId(id);
                action.addError(this);
            } catch (QuickFixException e) {
                // Uh... okay, we fell over running an action we now can't even define.
            }
            this.action = action;
            this.jsStack = jsStack;
View Full Code Here

Examples of org.candlepin.policy.ValidationResult.addError()

    private EntitlementRulesTranslator translator;

    private ValidationResult fakeOutResult(String msg) {
        ValidationResult result = new ValidationResult();
        ValidationError err = new ValidationError(msg);
        result.addError(err);
        return result;
    }

    @Before
    public void init() {
View Full Code Here

Examples of org.codehaus.enunciate.contract.validation.ValidationResult.addError()

      if (attribute.isXmlList()) {
        result.addWarning(attribute, "The Objective-C client code won't serialize xml lists as an array, instead passing the list as a string that will need to be parsed. This may cause confusion to Objective-C consumers.");
      }

      if (attribute.isCollectionType() && attribute.isBinaryData()) {
        result.addError(attribute, "The Objective-C client code doesn't support a collection of items that are binary data. You'll have to define separate accessors for each item or disable the Objective-C module.");
      }

      if (this.translateIdTo.equals(attribute.getClientSimpleName())) {
        result.addError(attribute, "In Objective-C, 'id' is a keyword, so we have to translate 'id' to '" + this.translateIdTo + "'. So you either need to rename this accessor or specify something else to translate 'id' to in the configuration using the 'translateIdTo' attribute.");
      }
View Full Code Here

Examples of org.dmd.util.exceptions.ResultException.addError()

 
  public void addItem(RunContextItem rci) throws ResultException{
    RunContextItem existing = byName.get(rci.getItemName().getNameString());
    if (existing != null){
      ResultException ex = new ResultException();
      ex.addError("Clashing run context item name: " + rci.getItemName());
      ex.result.lastResult().moreMessages("Originally defined in module: " + existing.getDefinedInModule().getModuleName());
      ex.result.lastResult().moreMessages("Redefined in module: " + rci.getDefinedInModule().getModuleName());
      throw(ex);
    }
    byName.put(rci.getItemName().getNameString(), rci);
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.