Examples of ArgumentException


Examples of cli.System.ArgumentException

                pattern = new Regex(translated, setFlags(flags));
            }
            //noinspection ConstantIfStatement
            if (false) {
                // to keep the compiler happy
                throw new ArgumentException();
            }
        } catch (RegexSyntaxException e) {
            throw new XPathException(e.getMessage());
        } catch (ArgumentException e) {
            throw new XPathException("Error in translated regular expression. Input regex = " +
View Full Code Here

Examples of cli.System.ArgumentException

            IllegalAccessException,
            InvocationTargetException {
        try {
            // dummy code to satisfy the Java compiler
            if (false) throw new MethodAccessException("");
            if (false) throw new ArgumentException("");
            if (false) throw new TargetInvocationException(null);
            if (false) throw new TargetParameterCountException("");

            // Here's the real work
            return constructor.Invoke(params);
View Full Code Here

Examples of cli.System.ArgumentException

        try {
            // dummy code to satisfy the Java compiler
            if (false) throw new TargetException("");
            if (false) throw new MethodAccessException("");
            if (false) throw new ArgumentException("");
            if (false) throw new TargetInvocationException(null);
            if (false) throw new TargetParameterCountException("");

            // Here's the real work
            return method.Invoke(instance, params);
View Full Code Here

Examples of org.apache.james.managesieve.api.ArgumentException

   
    public Map<Capabilities, String> capability(String args) throws ArgumentException
    {
        if (!args.trim().isEmpty())
        {
            throw new ArgumentException("Too many arguments: " + args);
        }
        return _core.capability();
    }
View Full Code Here

Examples of org.apache.james.managesieve.api.ArgumentException

    public void deleteScript(String args) throws AuthenticationRequiredException, ScriptNotFoundException, IsActiveException, ArgumentException
    {      
        String scriptName = ParserUtils.getScriptName(args);
        if (null == scriptName || scriptName.isEmpty())
        {
            throw new ArgumentException("Missing argument: script name");
        }
       
        Scanner scanner = new Scanner(args.substring(scriptName.length()).trim()).useDelimiter("\\A");
        if (scanner.hasNext())
        {
            throw new ArgumentException("Too many arguments: " + scanner.next());
        }
        _core.deleteScript(ParserUtils.unquote(scriptName));
    }   
View Full Code Here

Examples of org.apache.james.managesieve.api.ArgumentException

    public String getScript(String args) throws AuthenticationRequiredException, ScriptNotFoundException, ArgumentException
    {
        String scriptName = ParserUtils.getScriptName(args);
        if (null == scriptName || scriptName.isEmpty())
        {
            throw new ArgumentException("Missing argument: script name");
        }
        Scanner scanner = new Scanner(args.substring(scriptName.length()).trim()).useDelimiter("\\A");
        if (scanner.hasNext())
        {
            throw new ArgumentException("Too many arguments: " + scanner.next());
        }
        return _core.getScript(ParserUtils.unquote(scriptName));
    }    
View Full Code Here

Examples of org.apache.james.managesieve.api.ArgumentException

   
    public List<String> checkScript(String args) throws ArgumentException, AuthenticationRequiredException, SyntaxException
    {
        if (args.trim().isEmpty())
        {
            throw new ArgumentException("Missing argument: script content");
        }
        return _core.checkScript(args);
    }
View Full Code Here

Examples of org.nasutekds.server.util.args.ArgumentException

  {
    if (args != null) {
      for (Argument arg : args) {
        for (Argument otherArg : args) {
          if (arg != otherArg && arg.isPresent() && otherArg.isPresent()) {
            throw new ArgumentException(
                    ToolMessages.ERR_INCOMPATIBLE_ARGUMENTS.get(
                            arg.getName(), otherArg.getName()));
          }
        }
      }
View Full Code Here

Examples of org.nasutekds.server.util.args.ArgumentException

    } catch (ConcurrentModificationException e) {
      Message msg = ERR_DSCFG_ERROR_MODIFY_CME.get(ufn);
      throw new ClientException(LDAPResultCode.CONSTRAINT_VIOLATION, msg);
    } catch (ManagedObjectNotFoundException e) {
      String objName = names.get(names.size() - 1);
      ArgumentException except = null;
      Message msg;
      // if object name is 'null', get a user-friendly string to represent this
      if (objName == null) {
        msg = ERR_DSCFG_ERROR_FINDER_NO_CHILDREN_NULL.get();
        except = new ArgumentException(msg);
      } else {
       except = ArgumentExceptionFactory.unknownValueForChildComponent(
        "\"" + objName + "\"");
      }
      if (app.isInteractive()) {
        app.println();
        app.printVerboseMessage(except.getMessageObject());
        return MenuResult.cancel();
      } else {
        throw except;
      }
    }
View Full Code Here

Examples of org.nasutekds.server.util.args.ArgumentException

    // arguments.
    MessageBuilder buf = new MessageBuilder();
    int v = secureArgsList.validateGlobalOptions(buf);
    if (v != DsFrameworkCliReturnCode.SUCCESSFUL_NOP.getReturnCode())
    {
      throw new ArgumentException(buf.toMessage());
    }
  }
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.