Add nice error message when renderer is not available
This commit is contained in:
@@ -34,6 +34,7 @@ import com.sheepit.client.Error.ServerCode;
|
||||
import com.sheepit.client.Error.Type;
|
||||
import com.sheepit.client.exception.FermeException;
|
||||
import com.sheepit.client.exception.FermeExceptionBadResponseFromServer;
|
||||
import com.sheepit.client.exception.FermeExceptionNoRendererAvailable;
|
||||
import com.sheepit.client.exception.FermeExceptionNoRightToRender;
|
||||
import com.sheepit.client.exception.FermeExceptionNoSession;
|
||||
import com.sheepit.client.exception.FermeExceptionNoSpaceLeftOnDevice;
|
||||
@@ -188,6 +189,17 @@ public class Client {
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (FermeExceptionNoRendererAvailable e) {
|
||||
this.gui.error(Error.humanString(Error.Type.RENDERER_NOT_AVAILABLE));
|
||||
// should wait forever to actually display the message to the user
|
||||
while (true) {
|
||||
try {
|
||||
Thread.sleep(100000);
|
||||
}
|
||||
catch (InterruptedException e1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (FermeExceptionNoSession e) {
|
||||
// User has no session need to re-authenticate
|
||||
ret = this.server.getConfiguration();
|
||||
|
||||
Reference in New Issue
Block a user