1 30 31 38 package com.nightlabs.io; 39 40 import java.io.File ; 41 import java.io.FileNotFoundException ; 42 import java.io.IOException ; 43 44 45 public class ReadException 46 extends Exception 47 { 48 49 File fileToRead; 50 public File getFileToRead() { return fileToRead; } 51 boolean fileNotFound = false; 52 boolean ioException = false; 53 54 public ReadException(File _fileToRead, String message) 55 { 56 super(message); 57 this.fileToRead = _fileToRead; 58 } 59 60 public ReadException(File _fileToRead, String message, Throwable cause) 61 { 62 super(message, cause); 63 this.fileToRead = _fileToRead; 64 65 if (cause instanceof FileNotFoundException ) { 66 fileNotFound = true; 67 } 68 else if (cause instanceof IOException ) { 69 ioException = true; 70 } 71 } 72 73 } 74 | Popular Tags |