From 14c9e6bc2cfc6f454e7c83a68b51fe175374b547 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 15 Jun 2004 18:25:13 +0000 Subject: [PATCH] Fail more gracefully in this circumstance, not that there's much we can do. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3027 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/resource/ResourceManager.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/resource/ResourceManager.java b/src/java/com/threerings/resource/ResourceManager.java index a0b1a0ad1..4e79a46fc 100644 --- a/src/java/com/threerings/resource/ResourceManager.java +++ b/src/java/com/threerings/resource/ResourceManager.java @@ -1,5 +1,5 @@ // -// $Id: ResourceManager.java,v 1.40 2004/02/25 14:49:39 mdb Exp $ +// $Id: ResourceManager.java,v 1.41 2004/06/15 18:25:13 mdb Exp $ package com.threerings.resource; @@ -283,12 +283,22 @@ public class ResourceManager curl = new URL(_rurl, configPath); config.load(curl.openStream()); } + } catch (MalformedURLException mue) { Log.warning("Unable to construct config URL [resourceURL=" + _rurl + ", configPath=" + configPath + ", error=" + mue + "]."); String errmsg = "Invalid config url [resourceURL=" + _rurl + ", configPath=" + configPath + "]"; throw new IOException(errmsg); + + } catch (Exception e) { + Log.warning("Unable to load resource mgr properties " + + "[resourceURL=" + _rurl + ", configPath=" + configPath + + ", error=" + e + "]."); + Log.logStackTrace(e); + String errmsg = "Unable to load resource manager config " + + "[resourceURL=" + _rurl + ", configPath=" + configPath + "]"; + throw new IOException(errmsg); } // resolve the configured resource sets