All java exception list

Содержание
  1. Java — Built-in Exceptions
  2. List of Java Exceptions
  3. Package java­.lang
  4. Package java­.util
  5. Package java­.io
  6. Package java­.awt
  7. Package java­.awt­.color
  8. Package java­.awt­.datatransfer
  9. Package java­.awt­.dnd
  10. Package java­.awt­.geom
  11. Package java­.awt­.image
  12. Package java­.awt­.print
  13. Package java­.beans
  14. Package java­.lang­.annotation
  15. Package java­.lang­.instrument
  16. Package java­.lang­.invoke
  17. Package java­.lang­.module
  18. Package java­.lang­.reflect
  19. Package java­.net
  20. Package java­.net­.http
  21. Package java­.nio
  22. Package java­.nio­.channels
  23. Package java­.nio­.charset
  24. Package java­.nio­.file
  25. Package java­.nio­.file­.attribute
  26. Package java­.rmi
  27. Package java­.rmi­.activation
  28. Package java­.rmi­.server
  29. Package java­.security
  30. Package java­.security­.acl
  31. Package java­.security­.cert
  32. Package java­.security­.spec
  33. Package java­.sql
  34. Package java­.text
  35. Package java­.time
  36. Package java­.time­.format
  37. Package java­.time­.temporal
  38. Package java­.time­.zone
  39. Package java­.util­.concurrent
  40. Package java­.util­.jar
  41. Package java­.util­.prefs
  42. Package java­.util­.regex
  43. Package java­.util­.zip
  44. Package com­.sun­.jdi
  45. Package com­.sun­.jdi­.connect
  46. Package com­.sun­.jdi­.connect­.spi
  47. Package com­.sun­.jdi­.request
  48. Package com­.sun­.nio­.sctp
  49. Package com­.sun­.tools­.attach
  50. Package javax­.annotation­.processing
  51. Package javax­.crypto
  52. Package javax­.imageio
  53. Package javax­.imageio­.metadata
  54. Package javax­.lang­.model
  55. Package javax­.lang­.model­.element
  56. Package javax­.lang­.model­.type
  57. Package javax­.management
  58. Package javax­.management­.modelmbean
  59. Package javax­.management­.monitor
  60. Package javax­.management­.openmbean
  61. Package javax­.management­.relation
  62. Package javax­.management­.remote
  63. Package javax­.naming
  64. Package javax­.naming­.directory
  65. Package javax­.naming­.ldap
  66. Package javax­.net­.ssl
  67. Package javax­.print
  68. Package javax­.print­.attribute
  69. Package javax­.script
  70. Package javax­.security­.auth
  71. Package javax­.security­.auth­.callback
  72. Package javax­.security­.auth­.login
  73. Package javax­.security­.cert
  74. Package javax­.security­.sasl
  75. Package javax­.smartcardio
  76. Package javax­.sound­.midi
  77. Package javax­.sound­.sampled
  78. Package javax­.sql­.rowset
  79. Package javax­.sql­.rowset­.serial
  80. Package javax­.sql­.rowset­.spi
  81. Package javax­.swing
  82. Package javax­.swing­.text
  83. Package javax­.swing­.tree
  84. Package javax­.swing­.undo
  85. Package javax­.transaction­.xa
  86. Package javax­.xml­.catalog
  87. Package javax­.xml­.crypto
  88. Package javax­.xml­.crypto­.dsig
  89. Package javax­.xml­.datatype
  90. Package javax­.xml­.parsers
  91. Package javax­.xml­.stream
  92. Package javax­.xml­.transform
  93. Package javax­.xml­.validation
  94. Package javax­.xml­.xpath
  95. Package jdk­.dynalink
  96. Package jdk­.jshell
  97. Package jdk­.jshell­.spi
  98. Package jdk­.nashorn­.api­.scripting
  99. Package jdk­.nashorn­.api­.tree
  100. Package jdk­.security­.jarsigner
  101. Package netscape­.javascript
  102. Package org­.ietf­.jgss
  103. Package org­.w3c­.dom
  104. Package org­.w3c­.dom­.events
  105. Package org­.w3c­.dom­.ls
  106. Package org­.w3c­.dom­.ranges
  107. Package org­.w3c­.dom­.xpath
  108. Package org­.xml­.sax
  109. Comments
  110. Java: List of Checked & Unchecked Exceptions
  111. Exceptions under the parent class java.lang.Throwable
  112. Exception
  113. ReflectiveOperationException
  114. RuntimeException
  115. Track, Analyze and Manage Errors With Rollbar

Java — Built-in Exceptions

Java defines several exception classes inside the standard package java.lang.

Читайте также:  Php array map callback

The most general of these exceptions are subclasses of the standard type RuntimeException. Since java.lang is implicitly imported into all Java programs, most exceptions derived from RuntimeException are automatically available.

Java defines several other types of exceptions that relate to its various class libraries. Following is the list of Java Unchecked RuntimeException.

Arithmetic error, such as divide-by-zero.

ArrayIndexOutOfBoundsException

Array index is out-of-bounds.

Assignment to an array element of an incompatible type.

IllegalArgumentException

Illegal argument used to invoke a method.

IllegalMonitorStateException

Illegal monitor operation, such as waiting on an unlocked thread.

IllegalStateException

Environment or application is in incorrect state.

IllegalThreadStateException

Requested operation not compatible with the current thread state.

IndexOutOfBoundsException

Some type of index is out-of-bounds.

NegativeArraySizeException

Array created with a negative size.

Invalid use of a null reference.

NumberFormatException

Invalid conversion of a string to a numeric format.

Attempt to violate security.

StringIndexOutOfBounds

Attempt to index outside the bounds of a string.

UnsupportedOperationException

An unsupported operation was encountered.

Following is the list of Java Checked Exceptions Defined in java.lang.

ClassNotFoundException

CloneNotSupportedException

Attempt to clone an object that does not implement the Cloneable interface.

IllegalAccessException

Access to a class is denied.

InstantiationException

Attempt to create an object of an abstract class or interface.

One thread has been interrupted by another thread.

A requested field does not exist.

NoSuchMethodException

A requested method does not exist.

Источник

List of Java Exceptions

All public exceptions and errors in the Java API, grouped by package.

✔: Checked exception
: Since version

Package java­.lang

  • Throwable ✔
    • Exception ✔
      • Clone­Not­Supported­Exception ✔
      • Interrupted­Exception ✔
      • Reflective­Operation­Exception ✔
        • Class­Not­Found­Exception ✔
        • Illegal­Access­Exception ✔
        • Instantiation­Exception ✔
        • No­Such­Field­Exception ✔
        • No­Such­Method­Exception ✔
        • Arithmetic­Exception
        • Array­Store­Exception
        • Class­Cast­Exception
        • Enum­Constant­Not­Present­Exception
        • Illegal­Argument­Exception
          • Illegal­Thread­State­Exception
          • Number­Format­Exception
          • Array­Index­Out­Of­Bounds­Exception
          • String­Index­Out­Of­Bounds­Exception
          • Assertion­Error
          • Linkage­Error
            • Bootstrap­Method­Error
            • Class­Circularity­Error
            • Class­Format­Error
              • Unsupported­Class­Version­Error
              • Abstract­Method­Error
              • Illegal­Access­Error
              • Instantiation­Error
              • No­Such­Field­Error
              • No­Such­Method­Error
              • Internal­Error
              • Out­Of­Memory­Error
              • Stack­Overflow­Error
              • Unknown­Error

              Package java­.util

              • Service­Configuration­Error
              • Invalid­Properties­Format­Exception ✔
              • Concurrent­Modification­Exception
              • Empty­Stack­Exception
              • Illegal­Format­Exception
                • Duplicate­Format­Flags­Exception
                • Format­Flags­Conversion­Mismatch­Exception
                • Illegal­Format­Code­Point­Exception
                • Illegal­Format­Conversion­Exception
                • Illegal­Format­Flags­Exception
                • Illegal­Format­Precision­Exception
                • Illegal­Format­Width­Exception
                • Missing­Format­Argument­Exception
                • Missing­Format­Width­Exception
                • Unknown­Format­Conversion­Exception
                • Unknown­Format­Flags­Exception
                • Input­Mismatch­Exception

                Package java­.io

                • I­O­Error
                • I­O­Exception ✔
                  • Char­Conversion­Exception ✔
                  • E­O­F­Exception ✔
                  • File­Not­Found­Exception ✔
                  • Interrupted­I­O­Exception ✔
                  • Object­Stream­Exception ✔
                    • Invalid­Class­Exception ✔
                    • Invalid­Object­Exception ✔
                    • Not­Active­Exception ✔
                    • Not­Serializable­Exception ✔
                    • Optional­Data­Exception ✔
                    • Stream­Corrupted­Exception ✔
                    • Write­Aborted­Exception ✔

                    Package java­.awt

                    Package java­.awt­.color

                    Package java­.awt­.datatransfer

                    Package java­.awt­.dnd

                    Package java­.awt­.geom

                    Package java­.awt­.image

                    Package java­.awt­.print

                    Package java­.beans

                    Package java­.lang­.annotation

                    Package java­.lang­.instrument

                    Package java­.lang­.invoke

                    Package java­.lang­.module

                    Package java­.lang­.reflect

                    Package java­.net

                    Package java­.net­.http

                    Package java­.nio

                    Package java­.nio­.channels

                    Package java­.nio­.charset

                    Package java­.nio­.file

                    Package java­.nio­.file­.attribute

                    Package java­.rmi

                    • Already­Bound­Exception ✔
                    • Remote­Exception ✔
                      • Access­Exception ✔
                      • Connect­Exception ✔
                      • Connect­I­O­Exception ✔
                      • Marshal­Exception ✔
                      • No­Such­Object­Exception ✔
                      • Server­Error ✔
                      • Server­Exception ✔
                      • Server­Runtime­Exception ✔
                      • Stub­Not­Found­Exception ✔
                      • Unexpected­Exception ✔
                      • Unknown­Host­Exception ✔
                      • Unmarshal­Exception ✔

                      Package java­.rmi­.activation

                      Package java­.rmi­.server

                      Package java­.security

                      Package java­.security­.acl

                      Package java­.security­.cert

                      Package java­.security­.spec

                      Package java­.sql

                      • S­Q­L­Exception ✔
                        • Batch­Update­Exception ✔
                        • S­Q­L­Client­Info­Exception ✔
                        • S­Q­L­Non­Transient­Exception ✔
                          • S­Q­L­Data­Exception ✔
                          • S­Q­L­Feature­Not­Supported­Exception ✔
                          • S­Q­L­Integrity­Constraint­Violation­Exception ✔
                          • S­Q­L­Invalid­Authorization­Spec­Exception ✔
                          • S­Q­L­Non­Transient­Connection­Exception ✔
                          • S­Q­L­Syntax­Error­Exception ✔
                          • S­Q­L­Timeout­Exception ✔
                          • S­Q­L­Transaction­Rollback­Exception ✔
                          • S­Q­L­Transient­Connection­Exception ✔
                          • Data­Truncation ✔

                          Package java­.text

                          Package java­.time

                          Package java­.time­.format

                          Package java­.time­.temporal

                          Package java­.time­.zone

                          Package java­.util­.concurrent

                          Package java­.util­.jar

                          Package java­.util­.prefs

                          Package java­.util­.regex

                          Package java­.util­.zip

                          Package com­.sun­.jdi

                          • Absent­Information­Exception ✔
                          • Class­Not­Loaded­Exception ✔
                          • Incompatible­Thread­State­Exception ✔
                          • Invalid­Type­Exception ✔
                          • Invocation­Exception ✔
                          • Class­Not­Prepared­Exception
                          • Inconsistent­Debug­Info­Exception
                          • Internal­Exception
                          • Invalid­Code­Index­Exception
                          • Invalid­Line­Number­Exception
                          • Invalid­Module­Exception 9
                          • Invalid­Stack­Frame­Exception
                          • Native­Method­Exception
                          • Object­Collected­Exception
                          • V­M­Cannot­Be­Modified­Exception
                          • V­M­Disconnected­Exception
                          • V­M­Mismatch­Exception
                          • V­M­Out­Of­Memory­Exception

                          Package com­.sun­.jdi­.connect

                          Package com­.sun­.jdi­.connect­.spi

                          Package com­.sun­.jdi­.request

                          Package com­.sun­.nio­.sctp

                          Package com­.sun­.tools­.attach

                          Package javax­.annotation­.processing

                          Package javax­.crypto

                          Package javax­.imageio

                          Package javax­.imageio­.metadata

                          Package javax­.lang­.model

                          Package javax­.lang­.model­.element

                          Package javax­.lang­.model­.type

                          Package javax­.management

                          • Bad­Attribute­Value­Exp­Exception ✔
                          • Bad­Binary­Op­Value­Exp­Exception ✔
                          • Bad­String­Operation­Exception ✔
                          • Invalid­Application­Exception ✔
                          • J­M­Exception ✔
                            • M­Bean­Exception ✔
                              • M­Bean­Registration­Exception ✔
                              • Attribute­Not­Found­Exception ✔
                              • Instance­Already­Exists­Exception ✔
                              • Instance­Not­Found­Exception ✔
                              • Introspection­Exception ✔
                              • Invalid­Attribute­Value­Exception ✔
                              • Listener­Not­Found­Exception ✔
                              • Malformed­Object­Name­Exception ✔
                              • Not­Compliant­M­Bean­Exception ✔
                              • Service­Not­Found­Exception ✔
                              • Runtime­Error­Exception
                              • Runtime­M­Bean­Exception
                              • Runtime­Operations­Exception

                              Package javax­.management­.modelmbean

                              Package javax­.management­.monitor

                              Package javax­.management­.openmbean

                              Package javax­.management­.relation

                              • Relation­Exception ✔
                                • Invalid­Relation­Id­Exception ✔
                                • Invalid­Relation­Service­Exception ✔
                                • Invalid­Relation­Type­Exception ✔
                                • Invalid­Role­Info­Exception ✔
                                • Invalid­Role­Value­Exception ✔
                                • Relation­Not­Found­Exception ✔
                                • Relation­Service­Not­Registered­Exception ✔
                                • Relation­Type­Not­Found­Exception ✔
                                • Role­Info­Not­Found­Exception ✔
                                • Role­Not­Found­Exception ✔

                                Package javax­.management­.remote

                                Package javax­.naming

                                • Naming­Exception ✔
                                  • Cannot­Proceed­Exception ✔
                                  • Communication­Exception ✔
                                  • Configuration­Exception ✔
                                  • Context­Not­Empty­Exception ✔
                                  • Insufficient­Resources­Exception ✔
                                  • Interrupted­Naming­Exception ✔
                                  • Invalid­Name­Exception ✔
                                  • Limit­Exceeded­Exception ✔
                                    • Size­Limit­Exceeded­Exception ✔
                                    • Time­Limit­Exceeded­Exception ✔
                                    • Link­Loop­Exception ✔
                                    • Malformed­Link­Exception ✔
                                    • Authentication­Exception ✔
                                    • Authentication­Not­Supported­Exception ✔
                                    • No­Permission­Exception ✔

                                    Package javax­.naming­.directory

                                    Package javax­.naming­.ldap

                                    Package javax­.net­.ssl

                                    Package javax­.print

                                    Package javax­.print­.attribute

                                    Package javax­.script

                                    Package javax­.security­.auth

                                    Package javax­.security­.auth­.callback

                                    Package javax­.security­.auth­.login

                                    Package javax­.security­.cert

                                    Package javax­.security­.sasl

                                    Package javax­.smartcardio

                                    Package javax­.sound­.midi

                                    Package javax­.sound­.sampled

                                    Package javax­.sql­.rowset

                                    Package javax­.sql­.rowset­.serial

                                    Package javax­.sql­.rowset­.spi

                                    Package javax­.swing

                                    Package javax­.swing­.text

                                    Package javax­.swing­.tree

                                    Package javax­.swing­.undo

                                    Package javax­.transaction­.xa

                                    Package javax­.xml­.catalog

                                    Package javax­.xml­.crypto

                                    Package javax­.xml­.crypto­.dsig

                                    Package javax­.xml­.datatype

                                    Package javax­.xml­.parsers

                                    Package javax­.xml­.stream

                                    Package javax­.xml­.transform

                                    Package javax­.xml­.validation

                                    Package javax­.xml­.xpath

                                    Package jdk­.jshell

                                    Package jdk­.jshell­.spi

                                    Package jdk­.nashorn­.api­.scripting

                                    Package jdk­.nashorn­.api­.tree

                                    Package jdk­.security­.jarsigner

                                    Package netscape­.javascript

                                    Package org­.ietf­.jgss

                                    Package org­.w3c­.dom

                                    Package org­.w3c­.dom­.events

                                    Package org­.w3c­.dom­.ls

                                    Package org­.w3c­.dom­.ranges

                                    Package org­.w3c­.dom­.xpath

                                    Package org­.xml­.sax

                                    Comments

                                    Источник

                                    Java: List of Checked & Unchecked Exceptions

                                    Java: List of Checked & Unchecked Exceptions

                                    Like most modern programming languages, Java includes the concept of exceptions to handle both errors and «exceptional events.» When an exception occurs in your code, it disrupts the normal instruction logic and abnormally terminates the process.

                                    However, with a little foresight and code, you can often handle these exceptions gracefully, allowing your code to continue running and providing insight for tracking down the root cause of the unexpected result.

                                    Below we have compiled a list of Checked and UncheckedJava exceptions you would likely encounter, with links to their corresponding guide on how best to implement them.

                                    Exceptions under the parent class java.lang.Throwable

                                    Checked exceptions are denoted by the ✓ mark

                                    Exception

                                    ReflectiveOperationException

                                    RuntimeException

                                    IllegalArgumentException
                                    IndexOutOfBoundsException

                                    Track, Analyze and Manage Errors With Rollbar

                                    Managing errors and exceptions in your code is challenging. It can make deploying production code an unnerving experience. Being able to track, analyse, and manage errors in real-time can help you proceed with more confidence. Rollbar automates error monitoring and triaging, making fixing Java errors easier than ever. Sign Up Today!

                                    Источник

Оцените статью