public static void handleException(RepositoryAdapter repository, Exception exc,
			String operation, boolean mustRetry, Component parent) {

		String title = "Error During " + operation;
		if ((exc instanceof ConnectException) || (exc instanceof NotConnectedException)) {
			Msg.debug(ClientUtil.class, "Server not connected (" + operation + ")");
			promptForReconnect(repository, operation, mustRetry, parent);
		}
		else if (exc instanceof RepositoryNotFoundException) {
			Msg.showError(ClientUtil.class, parent, title, exc.getMessage());
		}
		else if (exc instanceof UserAccessException) {
			Msg.showError(ClientUtil.class, parent, title,
				"Access denied: " + repository + "\n" + exc.getMessage());
		}
		else if ((exc instanceof ServerException) || (exc instanceof ServerError)) {
			Msg.showError(ClientUtil.class, parent, title,
				"Exception occurred on the Ghidra Server.", exc.getCause());
		}
		else if (exc instanceof RemoteException) {
			Msg.showError(ClientUtil.class, parent, title,
				"Exception occurred communicating with Ghidra Server.", exc.getCause());
		}
		else {
			String excMsg = exc.getMessage();
			if (excMsg == null) {
				excMsg = exc.toString();
			}
			if (exc instanceof IOException) {
				Msg.showError(ClientUtil.class, parent, title, excMsg, exc);
			}
			else {
				// show the stacktrace for non-IOException
				Msg.showError(ClientUtil.class, parent, title, excMsg, exc);
			}
		}
	}
Displays an error dialog appropriate for the given exception. If the exception is a
ConnectException or NotConnectedException, a prompt to reconnect to the Ghidra Server
is displayed.

@param repository may be null if the exception is not a RemoteException
@param exc exception that occurred
@param operation operation that was being done when the exception occurred; this string
is be used in the message for the error dialog if one should be displayed
@param mustRetry true if the message should state that the user should retry the operation
because it may not have succeeded (if the exception was because a RemoteException); there
may be cases where the operation succeeded; as a result of the operation, a bad connection
to the server was detected (e.g., save a file). Note: this parameter is ignored if the
exception is not a ConnectException or NotConnectedException.
@param parent parent of the error dialog
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ClientUtil.java