Consolidate exceptions thrown from Class-File API

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: None
    • Component/s: core-libs

      Class-File API actually throws wide variety of exceptions based on the actual situation. Complete error handling code must cover `IndexOutOfBoundsException`, `IllegalStateException` and `IllegalArgumentException`.

      Based on previous discussions we decided to consolidate on `IllegalArgumentException` with possible sub-classes.

      It allows easy common error handling in majority of use case, however it allows also to distinguish source of the error when needed (for example `javap` needs to know if the exception comes from constant poll or not).

      Newly introduced `ConstantPoolException` will extend `IllegalArgumentException` to indicate the source of the problem is in constant pool.

      More sub-classes of `IllegalArgumentException` may be introduced later as needed and without disruption of the existing error handlers.

            Assignee:
            Adam Sotona
            Reporter:
            Adam Sotona
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: