我正在努力学习Java中的异常,出于教育目的,如果我能得到标准API中所有已检查异常和所有未检查异常的引用,那就太好了。
相关的问题,但不是我想要的。
查看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
和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
这些是直接子类,所以这个列表远远不够完整。检查异常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