Re: throw the exception but continue the flow?



Steve wrote:
When it throws the exception, how to not stop the program but keep
continue?

When I get this exception, it stops and cannot continue.

Exception in thread "main" java.io.FileNotFoundException:
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
rce)

please help. thanks

try {
// put your code here that can throw the exception below in the
// catch part of this structure
} catch (FileNotFoundException e) {
// code here to clean up from your exception
}
// next sequential instruction

--

Knute Johnson
email s/nospam/linux/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
.



Relevant Pages

  • Re: problem with sending xml documents over network
    ... What version of the compiler? ... I'm not getting an exception when I should. ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (comp.lang.java.help)
  • Re: error handling
    ... > exception is not one that can be corrected, how do I exit the program? ... > and the program needs to be shut down, but I don't know how to code the ... > Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... > Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (microsoft.public.dotnet.languages.vb)
  • Re: very simple encryption
    ... I just need a simple way to encrypt/decrypt a string, main purpose is, ... public static void mainthrows Exception { ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (comp.lang.java.programmer)
  • error handling
    ... If I have a Try Catch block that captures an exception in a function located ... and the program needs to be shut down, but I don't know how to code the shut ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Sub Main()
    ... no longer work. ... I will have to do some reading on Exception ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service ... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access ...
    (microsoft.public.dotnet.languages.vb)