我正在尝试学习Java中的异常,并且出于教育目的,如果我能够获得标准API中所有已检查异常和所有未经检查的异常的引用,那将会很好。
Related question但不完全是我追求的目标。
答案 0 :(得分:1)
查看Exception
的直接已知子类。所有这些异常(RuntimeException
除外)都是示例检查异常:
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
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
这些是直接子类,因此这个列表远未完成。已检查的异常IOException
具有以下子类:
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