Cleaner exceptions.
This commit is contained in:
parent
f1f10521e2
commit
92a212c8c8
@ -106,9 +106,9 @@ public class ServerConnector extends PacketHandler
|
||||
return connect( user, def, false );
|
||||
} 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 ) );
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user