Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Technically this code need not catch ArrayIndexOutOfBoundsException since it is a runtime exception. In fact, this code should not catch ARrayIndexOutOfBoundsException unless the method has a particular way of handling it (that differs from handling any other exception class). Otherwise, this code should just let the exception propagate up the call stack.

Applicability

Use of exceptions for any purpose other than detecting and handling exceptional conditions complicates program analysis and debugging, degrades performance and can increase maintenance costs.

...