added ErrorFrame support

pull/108/head
js 5 years ago
parent 6331f9f144
commit 0a1cce3127

@ -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 servers response", LogLevel.Error);
ErrorFrame err = new ErrorFrame("Cannot decode servers response");
} catch (VersionError e) {
writeLog("Servers response use bad version of the protocol", LogLevel.Error);
ErrorFrame err = new ErrorFrame("Servers 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 clients request", LogLevel.Error);
ErrorFrame err = new ErrorFrame("Server cannot decode clients 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");
}
}
}

Loading…
Cancel
Save