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


Groups > comp.lang.java.help > #616

Re: Some same exceptions used in a given file

From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
Newsgroups comp.lang.java.help
Subject Re: Some same exceptions used in a given file
References <87r58s28w3.fsf@merciadriluca-station.MERCIADRILUCA> <iov6eu$ps5$1@dont-email.me> <exit-20110423212734@ram.dialup.fu-berlin.de>
Message-ID <czGsp.45668$zn.2534@newsfe19.iad> (permalink)
Organization Public Usenet Newsgroup Access
Date 2011-04-23 17:23 -0300

Show all headers | View raw


On 11-04-23 04:28 PM, Stefan Ram wrote:
> Eric Sosman <esosman@ieee-dot-org.invalid> writes:
>> On 4/23/2011 1:08 PM, Merciadri Luca wrote:
>>>          catch (IOException cantOpenFile)
>>>              {
>>>                  System.err.println("Can't open " + inputFilename + ".");
>>>                  System.exit(1);
>>>              }
>>     Could you give an example of what you're trying to do?  (The
>> above isn't sufficiently informative.)
> 
>   I guess,
> 
> catch (IOException cantOpenFile)
> { MyUtils.exit("Can't open " + inputFilename + "."); }
> 
My guess is that he'd like the equivalent of an
UncaughtExceptionHandler, except not one based on threads but rather on
exception types. In other words, handlers perhaps based on lexical scope
(including try {} blocks, but also methods) and registered against
exception types.

Of course I could be wildly offbase and just guilty of wishful thinking.

AHS
-- 
Governor Thomas was so pleas'd with the Construction of this Stove, as
describ'd in it, that he offer'd to give me a Patent for the sole
Vending of them for a Term of Years; but I declin'd it from a Principle
which has ever weigh'd with me on such Occasions, viz. That as we enjoy
great Advantages from the Inventions of Others, we should be glad of an
Opportunity to serve others by any Invention of ours, and this we should
do freely and generously.
-- Benjamin Franklin

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


Thread

Some same exceptions used in a given file Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-04-23 19:08 +0200
  Re: Some same exceptions used in a given file Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-04-23 14:40 -0400
    Re: Some same exceptions used in a given file Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-04-23 16:23 -0400
    Re: Some same exceptions used in a given file Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-23 17:23 -0300
    Re: Some same exceptions used in a given file Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-04-24 00:00 +0200
      Re: Some same exceptions used in a given file Lew <noone@lewscanon.com> - 2011-04-23 18:22 -0400
      Re: Some same exceptions used in a given file Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-04-23 18:31 -0400
        Re: Some same exceptions used in a given file Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-04-24 01:20 +0200
          Re: Some same exceptions used in a given file Lew <noone@lewscanon.com> - 2011-04-23 20:19 -0400
      Re: Some same exceptions used in a given file Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-23 22:25 -0300
        Re: Some same exceptions used in a given file Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-04-24 09:24 +0200
  Re: Some same exceptions used in a given file Patricia Shanahan <pats@acm.org> - 2011-04-23 13:48 -0700
    Re: Some same exceptions used in a given file Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-04-24 09:34 +0200
      Re: Some same exceptions used in a given file Lew <noone@lewscanon.com> - 2011-04-24 09:40 -0400
      Re: Some same exceptions used in a given file Patricia Shanahan <pats@acm.org> - 2011-04-24 06:53 -0700
  Re: Some same exceptions used in a given file Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> - 2011-04-24 01:28 +0200

csiph-web