From 859a7731fb242c413adb11ffbe7aed6dbc56ac72 Mon Sep 17 00:00:00 2001 From: dchandler Date: Fri, 4 Oct 2002 04:37:32 +0000 Subject: [PATCH] More robust--handles the case when tibwn.ini cannot be found. --- source/org/thdl/tib/text/TibetanMachineWeb.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/org/thdl/tib/text/TibetanMachineWeb.java b/source/org/thdl/tib/text/TibetanMachineWeb.java index 0d92a99..cc7bd8c 100644 --- a/source/org/thdl/tib/text/TibetanMachineWeb.java +++ b/source/org/thdl/tib/text/TibetanMachineWeb.java @@ -277,6 +277,10 @@ public class TibetanMachineWeb { try { URL url = TibetanMachineWeb.class.getResource(fileName); + if (url == null) { + System.err.println("Cannot find " + fileName + "; aborting."); + System.exit(1); + } InputStreamReader isr = new InputStreamReader(url.openStream()); BufferedReader in = new BufferedReader(isr);