Package java.lang

Class Exception

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AclNotFoundException, AnnotatedException, BackingStoreException, BrokenBarrierException, CertException, CertificateException, CloneNotSupportedException, CMSException, CryptoException, DataFormatException, DatatypeConfigurationException, DateParseException, DecoderException, DestroyFailedException, EncoderException, ErrnoException, Exception, ExecutionException, GeneralSecurityException, HttpException, InterruptedException, InvalidPreferencesFormatException, IOException, JSONException, LastOwnerException, NoSuchStoreException, NotOwnerException, OperatorException, ParseException, ParserConfigurationException, PinEntryException, PKIXNameConstraintValidatorException, PrivilegedActionException, ReflectiveOperationException, RuntimeException, SAXException, SQLException, TimeoutException, TooManyListenersException, TransformerException, UnsupportedCallbackException, URISyntaxException, WrongNumberArgsException, XmlPullParserException, XPathException

public class Exception
extends Throwable
Exception is the superclass of all classes that represent recoverable exceptions. When exceptions are thrown, they may be caught by application code.
See Also:
Throwable, Error, RuntimeException, Serialized Form
  • Constructor Details

    • Exception

      public Exception()
      Constructs a new Exception that includes the current stack trace.
    • Exception

      public Exception​(String detailMessage)
      Constructs a new Exception with the current stack trace and the specified detail message.
      Parameters:
      detailMessage - the detail message for this exception.
    • Exception

      public Exception​(String detailMessage, Throwable throwable)
      Constructs a new Exception with the current stack trace, the specified detail message and the specified cause.
      Parameters:
      detailMessage - the detail message for this exception.
      throwable - the cause of this exception.
    • Exception

      public Exception​(Throwable throwable)
      Constructs a new Exception with the current stack trace and the specified cause.
      Parameters:
      throwable - the cause of this exception.