Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6827

Re: Catching mulitple Exceptions in JDK 1.7

Date 2011-08-06 09:45 -0700
From Patricia Shanahan <pats@acm.org>
Newsgroups comp.lang.java.programmer
Subject Re: Catching mulitple Exceptions in JDK 1.7
References (1 earlier) <m362miriv4.fsf@despammed.com> <0510e90d-1a19-4fe1-9445-65314b5da038@glegroupsg2000goo.googlegroups.com> <p00g379lejgiq3c2goiejo20dbcm7fu7ci@4ax.com> <C-ednUJpPJC0-qXTnZ2dnUVZ_o6dnZ2d@earthlink.com> <j1hsn1$a62$1@dont-email.me>
Message-ID <aKednc6QDY8D8qDTnZ2dnUVZ_hCdnZ2d@earthlink.com> (permalink)

Show all headers | View raw


On 8/5/2011 4:02 PM, Jeff Higgins wrote:
> On 08/02/2011 05:07 PM, Patricia Shanahan wrote:
>>
>> I've done an experiment, with interesting results.
>>
>> Before I go into more detail, I must protest...
>
> <http://jcp.org/aboutJava/communityprocess/maintenance/jsr901/index3.html>
> See: Comments To :)
>
> I had a quick look through the "normative version" and couldn't find
> a specification for this behavior. There is a good chance I could have
> overlooked it.
>

That "normative version" only has single type catch clauses. However, I
did some more searching, and found
http://download.oracle.com/otndocs/jcp/java_se-7-final-eval-spec/index.html.
The third of the available downloads, java_se-7-final-eval-annex-3.zip,
seems to contain a Java 7 JLS with multi-type catch clauses.

I've tried to read the relevant section, but the critical information
about the type calculation is given by the apparently harmless statement
"The declared type of an exception parameter that denotes its type as a
union with alternatives D1 | D2 | ... | Dn is lub(D1, D2, ..., Dn)
(ยง15.12.2.7)."

So, I went to section 15.12.2.7. It may well contain the relevant
information but I am not finding it at all easy to read. I'll revisit it
whenever I have time, with the aim of producing a more accessible
statement of the rules, at least for simple cases.

Patricia

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Catching mulitple Exceptions in JDK 1.7 Roedy Green <see_website@mindprod.com.invalid> - 2011-07-29 09:14 -0700
  Re: Catching mulitple Exceptions in JDK 1.7 Roedy Green <see_website@mindprod.com.invalid> - 2011-07-29 09:18 -0700
    Re: Catching mulitple Exceptions in JDK 1.7 markspace <-@.> - 2011-07-29 09:28 -0700
  Re: Catching mulitple Exceptions in JDK 1.7 Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2011-07-31 10:48 +0300
    Re: Catching mulitple Exceptions in JDK 1.7 Lew <lewbloch@gmail.com> - 2011-08-01 23:54 -0700
      Re: Catching mulitple Exceptions in JDK 1.7 Roedy Green <see_website@mindprod.com.invalid> - 2011-08-02 06:56 -0700
        Re: Catching mulitple Exceptions in JDK 1.7 Patricia Shanahan <pats@acm.org> - 2011-08-02 14:07 -0700
          Re: Catching mulitple Exceptions in JDK 1.7 supercalifragilisticexpialadiamaticonormalizeringelimatisticantations <supercalifragilisticexpialadiamaticonormalizeringelimatisticantations@averylongandannoyingdomainname.com> - 2011-08-03 23:31 -0400
            Re: Catching mulitple Exceptions in JDK 1.7 Patricia Shanahan <pats@acm.org> - 2011-08-03 21:03 -0700
          Re: Catching mulitple Exceptions in JDK 1.7 Jeff Higgins <jeff@invalid.invalid> - 2011-08-05 19:02 -0400
            Re: Catching mulitple Exceptions in JDK 1.7 Patricia Shanahan <pats@acm.org> - 2011-08-06 09:45 -0700
        Re: Catching mulitple Exceptions in JDK 1.7 Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2011-08-03 00:11 +0300

csiph-web