站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

CommandException (Command Line Parsing API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.sendopts/2 2.0

org.netbeans.api.sendopts
Class CommandException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.netbeans.api.sendopts.CommandException
All Implemented Interfaces:
Serializable

public final class CommandException
extends Exception

Signals that something is wrong when processing the command line arguments.

See Also:
Serialized Form

Constructor Summary
CommandException(int exitCode)
          Simple constructor for the CommandException to indicate that a processing error occurred.
CommandException(int exitCode, String locMsg)
          Creates new exception with a localised message assigned to it.
 
Method Summary
 int getExitCode()
          Returns an exit code for this exception.
 String getLocalizedMessage()
          Localized message describing the problem that is usually printed to the user.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandException

public CommandException(int exitCode)
Simple constructor for the CommandException to indicate that a processing error occurred. The provided exitCode represents the value to be usually send to as a return value to System.exit(int).

Parameters:
exitCode - the value, should be different than zero

CommandException

public CommandException(int exitCode,
                        String locMsg)
Creates new exception with a localised message assigned to it.

Parameters:
exitCode - exit code to report from the exception
locMsg - localised message
Method Detail

getExitCode

public int getExitCode()
Returns an exit code for this exception.

Returns:
integer exit code, zero if exited correctly

getLocalizedMessage

public String getLocalizedMessage()
Localized message describing the problem that is usually printed to the user.

Overrides:
getLocalizedMessage in class Throwable

org.netbeans.modules.sendopts/2 2.0

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.