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