Cleaner exceptions.

This commit is contained in:
md_5 2013-02-21 18:17:44 +11:00
parent f1f10521e2
commit 92a212c8c8
2 changed files with 3 additions and 3 deletions

View File

@ -106,9 +106,9 @@ public class ServerConnector extends PacketHandler
return connect( user, def, false ); return connect( user, def, false );
} else } else
{ {
if ( ex instanceof KickException ) if ( ex instanceof RuntimeException )
{ {
throw (KickException) ex; throw (RuntimeException) ex;
} }
throw new RuntimeException( "Could not connect to target server " + Util.exception( ex ) ); throw new RuntimeException( "Could not connect to target server " + Util.exception( ex ) );
} }

View File

@ -215,7 +215,7 @@ public abstract class DefinedPacket implements DataOutput
} }
} }
Preconditions.checkState( ret != null, "Don't know how to deal with packet ID {0}", Util.hex( id ) ); Preconditions.checkState( ret != null, "Don't know how to deal with packet ID %s", Util.hex( id ) );
return ret; return ret;
} }