System.err.println ("Missing argument(s)"); usage(); System.exit (1); }  catch (IllegalArgumentException ex) { System.err.println ("Bad option: " + ex.getMessage()); usage(); System.exit (1);
throw new IllegalArgumentException ("Missing argument(s)");
    private static void parseParams (String[] args)    {        try        {            int i = 0;            while ((i < args.length) && (args[i].startsWith ("-")))            {                if (args[i].equals ("-p"))                    prefix = args[++i];                else if (args[i].equals ("-i"))                    indent = Integer.parseInt (args[++i]);                else if (args[i].equals ("-l"))                    lineLen = Integer.parseInt (args[++i]);                else if (args[i].equals ("-R"))                    justification = JustifyTextWriter.RIGHT_JUSTIFY;                else if (args[i].equals ("-C"))                    justification = JustifyTextWriter.CENTER;                else if (args[i].equals ("-L"))                    justification = JustifyTextWriter.LEFT_JUSTIFY;                else                    throw new IllegalArgumentException (args[i]);                i++;            }            if (i < args.length)                in = new FileInputStream (args[i++]);            if (i < args.length)            {                System.err.println ("Too many arguments.");                usage();                System.exit (1);            }            if (justification != -1)            {                jtWriter = new JustifyTextWriter (System.out,                                                  justification,                                                  lineLen);            }        }        catch (ArrayIndexOutOfBoundsException ex)        {            System.err.println ("Missing argument(s)");            usage();            System.exit (1);        }        catch (IllegalArgumentException ex)        {            System.err.println ("Bad option: " + ex.getMessage());            usage();            System.exit (1);        }        catch (NumberFormatException ex)        {            System.err.println ("Bad argument to numeric option: "                              + ex.toString());            usage();            System.exit (1);        }        catch (IOException ex)        {            ex.printStackTrace();            System.exit (1);        }    }