How to handle the exception.

Discussions

EJB design: How to handle the exception.

  1. How to handle the exception. (1 messages)

    Please help me out
  2. Re: How to handle the exception.[ Go to top ]

    1. You could 'eat' it public void bacaFile(String filename) { try { File f = new File(filename); //other ops here } catch (IOException e) { } } 2. You can throw it public void bacaFile(String filename) throws IOException { File f = new File(filename); //other ops here } 3. You can throw it with your own exception public void bacaFile(String filename) throws YourDefinedException { try { File f = new File(filename); //other ops here } catch (IOException e) { throw new YourDefinedException("File not found"); //or //throw new YourDefinedException(e); } So many resources on the web that you can read about exception handling. }