Search code examples
javachecked-exceptionsunchecked-exception

Reference of all checked / unchecked exceptions in the standard API


I'm trying to learn about exceptions in Java and, for educational purposes, it would be nice if I could get hold of a reference of all checked exceptions and all unchecked exceptions in the standard API.

Related question but not quite what I'm after.


Solution

  • Have a look at Direct Known Subclasses for Exception. All these exceptions (except RuntimeException) are examples checked exceptions:

    AclNotFoundException
    ActivationException
    AlreadyBoundException
    ApplicationException
    AWTException
    BackingStoreException
    BadAttributeValueExpException
    BadBinaryOpValueExpException
    BadLocationException
    BadStringOperationException
    BrokenBarrierException
    CertificateException
    CloneNotSupportedException
    DataFormatException
    DatatypeConfigurationException
    DestroyFailedException
    ExecutionException
    ExpandVetoException
    FontFormatException
    GeneralSecurityException
    GSSException
    IllegalClassFormatException
    InterruptedException
    IntrospectionException
    InvalidApplicationException
    InvalidMidiDataException
    InvalidPreferencesFormatException
    InvalidTargetObjectTypeException
    IOException
    JAXBException
    JMException
    KeySelectorException
    LastOwnerException
    LineUnavailableException
    MarshalException
    MidiUnavailableException
    MimeTypeParseException
    MimeTypeParseException
    NamingException
    NoninvertibleTransformException
    NotBoundException
    NotOwnerException
    ParseException
    ParserConfigurationException
    PrinterException
    PrintException
    PrivilegedActionException
    PropertyVetoException
    ReflectiveOperationException
    RefreshFailedException
    RemarshalException
    RuntimeException
    SAXException
    ScriptException
    ServerNotActiveException
    SOAPException
    SQLException
    TimeoutException
    TooManyListenersException
    TransformerException
    TransformException
    UnmodifiableClassException
    UnsupportedAudioFileException
    UnsupportedCallbackException
    UnsupportedFlavorException
    UnsupportedLookAndFeelException
    URIReferenceException
    URISyntaxException
    UserException
    XAException
    XMLParseException
    XMLSignatureException
    XMLStreamException
    XPathException
    

    and RuntimeException:

    AnnotationTypeMismatchException
    ArithmeticException
    ArrayStoreException
    BufferOverflowException
    BufferUnderflowException
    CannotRedoException
    CannotUndoException
    ClassCastException
    CMMException
    ConcurrentModificationException
    DataBindingException
    DOMException
    EmptyStackException
    EnumConstantNotPresentException
    EventException
    FileSystemAlreadyExistsException
    FileSystemNotFoundException
    IllegalArgumentException
    IllegalMonitorStateException
    IllegalPathStateException
    IllegalStateException
    IllformedLocaleException
    ImagingOpException
    IncompleteAnnotationException
    IndexOutOfBoundsException
    JMRuntimeException
    LSException
    MalformedParameterizedTypeException
    MirroredTypesException
    MissingResourceException
    NegativeArraySizeException
    NoSuchElementException
    NoSuchMechanismException
    NullPointerException
    ProfileDataException
    ProviderException
    ProviderNotFoundException
    RasterFormatException
    RejectedExecutionException
    SecurityException
    SystemException
    TypeConstraintException
    TypeNotPresentException
    UndeclaredThrowableException
    UnknownEntityException
    UnmodifiableSetException
    UnsupportedOperationException
    WebServiceException
    WrongMethodTypeException
    

    These are the direct subclasses so this list is far from complete. The checked exception IOException has these subclasses:

    ChangedCharSetException
    CharacterCodingException
    CharConversionException
    ClosedChannelException
    EOFException
    FileLockInterruptionException
    FileNotFoundException
    FilerException
    FileSystemException
    HttpRetryException
    IIOException
    InterruptedByTimeoutException
    InterruptedIOException
    InvalidPropertiesFormatException
    JMXProviderException
    JMXServerErrorException
    MalformedURLException
    ObjectStreamException
    ProtocolException
    RemoteException
    SaslException
    SocketException
    SSLException
    SyncFailedException
    UnknownHostException
    UnknownServiceException
    UnsupportedDataTypeException
    UnsupportedEncodingException
    UserPrincipalNotFoundException
    UTFDataFormatException
    ZipException