- throw FileNotFoundException

git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@181 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
schlaepfer
2006-10-24 13:57:03 +00:00
parent fe38d72f65
commit 8f3325e137

View File

@@ -1,6 +1,7 @@
package ch.ntb.usb.logger;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.net.URL;
import java.util.Properties;
import java.util.logging.ConsoleHandler;
@@ -56,6 +57,9 @@ public class LogUtil {
private static void createLoggersFromProperties() {
try {
URL url = ClassLoader.getSystemResource(PROPERTIES_FILE);
if (url == null)
throw new FileNotFoundException(PROPERTIES_FILE
+ " not found -> file must be on classpath");
FileInputStream fis = new FileInputStream(url.getFile());
Properties prop = new Properties();
prop.load(fis);