Goodbye, NestableIOException.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3788 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -31,7 +31,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.samskivert.io.NestableIOException;
|
||||
import com.samskivert.util.HashIntMap;
|
||||
import com.samskivert.util.IntIntMap;
|
||||
import com.samskivert.util.Tuple;
|
||||
@@ -141,8 +140,8 @@ public class BundledComponentRepository
|
||||
}
|
||||
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
throw new NestableIOException(
|
||||
"Internal error unserializing metadata", cnfe);
|
||||
throw (IOException) new IOException(
|
||||
"Internal error unserializing metadata").initCause(cnfe);
|
||||
}
|
||||
|
||||
// if we failed to load our classes or actions, create empty
|
||||
|
||||
@@ -34,7 +34,6 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.samskivert.io.NestableIOException;
|
||||
import com.samskivert.util.ClassUtil;
|
||||
|
||||
import com.threerings.presents.Log;
|
||||
@@ -149,7 +148,7 @@ public class Streamer
|
||||
}
|
||||
String errmsg = "Failure invoking streamable writer " +
|
||||
"[class=" + _target.getName() + "]";
|
||||
throw new NestableIOException(errmsg, t);
|
||||
throw (IOException) new IOException(errmsg).initCause(t);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -217,7 +216,7 @@ public class Streamer
|
||||
String errmsg = "Failure writing streamable field " +
|
||||
"[class=" + _target.getName() +
|
||||
", field=" + field.getName() + "]";
|
||||
throw new NestableIOException(errmsg, e);
|
||||
throw (IOException) new IOException(errmsg).initCause(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -254,12 +253,12 @@ public class Streamer
|
||||
} catch (InstantiationException ie) {
|
||||
String errmsg = "Error instantiating object " +
|
||||
"[type=" + _target.getName() + "]";
|
||||
throw new NestableIOException(errmsg, ie);
|
||||
throw (IOException) new IOException(errmsg).initCause(ie);
|
||||
|
||||
} catch (IllegalAccessException iae) {
|
||||
String errmsg = "Error instantiating object " +
|
||||
"[type=" + _target.getName() + "]";
|
||||
throw new NestableIOException(errmsg, iae);
|
||||
throw (IOException) new IOException(errmsg).initCause(iae);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +295,7 @@ public class Streamer
|
||||
}
|
||||
String errmsg = "Failure invoking streamable reader " +
|
||||
"[class=" + _target.getName() + "]";
|
||||
throw new NestableIOException(errmsg, t);
|
||||
throw (IOException) new IOException(errmsg).initCause(t);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -378,7 +377,7 @@ public class Streamer
|
||||
String errmsg = "Failure reading streamable field " +
|
||||
"[class=" + _target.getName() +
|
||||
", field=" + field.getName() + "]";
|
||||
throw new NestableIOException(errmsg, e);
|
||||
throw (IOException) new IOException(errmsg).initCause(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ import org.apache.commons.digester.Digester;
|
||||
import org.apache.commons.io.CopyUtils;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import com.samskivert.io.NestableIOException;
|
||||
import com.samskivert.io.PersistenceException;
|
||||
|
||||
import com.threerings.media.Log;
|
||||
@@ -158,7 +157,7 @@ public class TileSetBundler
|
||||
} catch (SAXException saxe) {
|
||||
String errmsg = "Failure parsing bundler config file " +
|
||||
"[file=" + configFile.getPath() + "]";
|
||||
throw new NestableIOException(errmsg, saxe);
|
||||
throw (IOException) new IOException(errmsg).initCause(saxe);
|
||||
}
|
||||
fin.close();
|
||||
|
||||
@@ -185,7 +184,7 @@ public class TileSetBundler
|
||||
} catch (Exception e) {
|
||||
String errmsg = "Unable to create tileset rule set " +
|
||||
"instance [mapping=" + map + "].";
|
||||
throw new NestableIOException(errmsg, e);
|
||||
throw (IOException) new IOException(errmsg).initCause(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -245,7 +244,7 @@ public class TileSetBundler
|
||||
} catch (SAXException saxe) {
|
||||
String errmsg = "Failure parsing bundle description file " +
|
||||
"[path=" + bundleDesc.getPath() + "]";
|
||||
throw new NestableIOException(errmsg, saxe);
|
||||
throw (IOException) new IOException(errmsg).initCause(saxe);
|
||||
} finally {
|
||||
fin.close();
|
||||
}
|
||||
@@ -293,7 +292,7 @@ public class TileSetBundler
|
||||
} catch (PersistenceException pe) {
|
||||
String errmsg = "Failure obtaining a tileset id for " +
|
||||
"tileset [set=" + set + "].";
|
||||
throw new NestableIOException(errmsg, pe);
|
||||
throw (IOException) new IOException(errmsg).initCause(pe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,8 +420,9 @@ public class TileSetBundler
|
||||
CopyUtils.copy(imgin, jar);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new NestableIOException(
|
||||
"Failure bundling image " + ifile + ": " + e, e);
|
||||
String msg = "Failure bundling image " + ifile +
|
||||
": " + e;
|
||||
throw (IOException) new IOException(msg).initCause(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -447,7 +447,7 @@ public class TileSetBundler
|
||||
Log.warning("Failed to close botched bundle '" + target + "'.");
|
||||
}
|
||||
String errmsg = "Failed to create bundle " + target + ": " + e;
|
||||
throw new NestableIOException(errmsg, e);
|
||||
throw (IOException) new IOException(errmsg).initCause(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.nio.channels.SocketChannel;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import com.samskivert.io.NestableIOException;
|
||||
import com.samskivert.util.LoopingThread;
|
||||
import com.samskivert.util.Queue;
|
||||
import com.samskivert.util.RuntimeAdjust;
|
||||
@@ -377,8 +376,8 @@ public class Communicator
|
||||
return msg;
|
||||
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
throw new NestableIOException(
|
||||
"Unable to decode incoming message.", cnfe);
|
||||
throw (IOException) new IOException(
|
||||
"Unable to decode incoming message.").initCause(cnfe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ import java.net.InetAddress;
|
||||
import java.nio.channels.SelectionKey;
|
||||
import java.nio.channels.SocketChannel;
|
||||
|
||||
import com.samskivert.io.NestableIOException;
|
||||
|
||||
import com.threerings.io.FramedInputStream;
|
||||
import com.threerings.io.FramingOutputStream;
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
@@ -288,8 +286,8 @@ public abstract class Connection implements NetEventHandler
|
||||
"and error printing channel [error=" + cnfe + "].");
|
||||
}
|
||||
// deal with the failure
|
||||
handleFailure(new NestableIOException(
|
||||
"Unable to decode incoming message.", cnfe));
|
||||
handleFailure((IOException) new IOException(
|
||||
"Unable to decode incoming message.").initCause(cnfe));
|
||||
|
||||
} catch (IOException ioe) {
|
||||
// don't log a warning for the ever-popular "the client
|
||||
|
||||
@@ -32,7 +32,6 @@ import java.util.Enumeration;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
import com.samskivert.io.NestableIOException;
|
||||
import com.samskivert.io.StreamUtil;
|
||||
import com.samskivert.util.FileUtil;
|
||||
import com.samskivert.util.StringUtil;
|
||||
@@ -372,11 +371,11 @@ public class ResourceBundle
|
||||
return false;
|
||||
|
||||
} catch (IOException ioe) {
|
||||
Log.warning("Failure reading jar file '" + _source + "'.");
|
||||
String msg = "Failed to resolve resource bundle jar file '" +
|
||||
_source + "'";
|
||||
Log.warning(msg + ".");
|
||||
Log.logStackTrace(ioe);
|
||||
throw new NestableIOException(
|
||||
"Failed to resolve resource bundle jar file '" +
|
||||
_source + "'", ioe);
|
||||
throw (IOException) new IOException(msg).initCause(ioe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: CompiledConfig.java,v 1.4 2004/08/27 02:20:36 mdb Exp $
|
||||
// $Id$
|
||||
//
|
||||
// Narya library - tools for developing networked games
|
||||
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
|
||||
@@ -29,8 +29,6 @@ import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.samskivert.io.NestableIOException;
|
||||
|
||||
/**
|
||||
* Used to load and store compiled configuration data (generally XML files
|
||||
* that are parsed into Java object models and then serialized for rapid
|
||||
@@ -49,7 +47,7 @@ public class CompiledConfig
|
||||
return (Serializable)oin.readObject();
|
||||
} catch (ClassNotFoundException cnfe) {
|
||||
String errmsg = "Unknown config class";
|
||||
throw new NestableIOException(errmsg, cnfe);
|
||||
throw (IOException) new IOException(errmsg).initCause(cnfe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user