List of usage examples for java.util.logging ErrorManager OPEN_FAILURE
int OPEN_FAILURE
To view the source code for java.util.logging ErrorManager OPEN_FAILURE.
Click Source Link
From source file:FileErrorManager.java
/** * Performs the initialization for this object. *//*from w w w. j a v a2 s.c o m*/ private void init() { if (next == null) { throw new NullPointerException(ErrorManager.class.getName()); } File dir = this.emailStore; if (dir.getClass() != File.class) { //For security reasons. throw new IllegalArgumentException(dir.getClass().getName()); } if (!dir.isDirectory()) { throw new IllegalArgumentException("File must be a directory."); } if (!dir.canWrite()) { //Can throw under a security manager. super.error(dir.getAbsolutePath(), new SecurityException("write"), ErrorManager.OPEN_FAILURE); } //For now, only absolute paths are allowed. if (!dir.isAbsolute()) { throw new IllegalArgumentException("Only absolute paths are allowed."); } if (!dir.canRead()) { //Can throw under a security manager. super.error(dir.getAbsolutePath(), new SecurityException("read"), ErrorManager.OPEN_FAILURE); } }