|
|
|
@ -72,29 +72,38 @@ public class ClientInterfaceGUI extends ClientInterface {
|
|
|
|
|
win.setVisible(true);
|
|
|
|
|
} catch (EmptyDirectory e) {
|
|
|
|
|
writeLog("Server has no file in directory", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Server has no file in directory");
|
|
|
|
|
}
|
|
|
|
|
catch (InternalError e) {
|
|
|
|
|
writeLog("Client internal error", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Client internal error");
|
|
|
|
|
} catch (UnknownHostException e) {
|
|
|
|
|
writeLog("Server host is unknown", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Server host is unknown");
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
writeLog("Request cannot be send or response cannot be received", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Request cannot be send or response cannot be received");
|
|
|
|
|
} catch (TransmissionError e) {
|
|
|
|
|
writeLog("Message received is too big", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Message received is too big");
|
|
|
|
|
} catch (ProtocolError e) {
|
|
|
|
|
writeLog("Cannot decode server’s response", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Cannot decode server’s response");
|
|
|
|
|
} catch (VersionError e) {
|
|
|
|
|
writeLog("Server’s response use bad version of the protocol", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Server’s response use bad version of the protocol");
|
|
|
|
|
} catch (SizeError e) {
|
|
|
|
|
writeLog("Cannot handle this packets because of internal representation limitations of numbers on the client", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Cannot handle this packets because of internal representation limitations of numbers on the client");
|
|
|
|
|
} catch (InternalRemoteError e) {
|
|
|
|
|
writeLog("Server internal error", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Server internal error");
|
|
|
|
|
} catch (ProtocolRemoteError e) {
|
|
|
|
|
writeLog("Server cannot decode client’s request", LogLevel.Error);
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Server cannot decode client’s request");
|
|
|
|
|
} catch (VersionRemoteError e) {
|
|
|
|
|
writeLog("Server cannot decode this version of the protocol", LogLevel.Error);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ErrorFrame err = new ErrorFrame("Server cannot decode this version of the protocol");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|