Monday, March 8, 2010

I just can't handle it

There are better ways to handle exceptions...
public static InputStream readFile(File file)
{
    try
    {
        return new FileInputStream(file);
    }
    catch(Exception e)
    {
        System.exit(1);
    }
}

No comments:

Post a Comment