Skip to content

Commit

Permalink
handle case when no LDAP info can be found
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Aug 13, 2023
1 parent 3ffbb68 commit 811f99f
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@



//Java imports
import omero.log.LogMessage;
import org.openmicroscopy.shoola.agents.metadata.editor.Editor;
import omero.gateway.SecurityContext;
import org.openmicroscopy.shoola.env.data.views.CallHandle;
Expand Down Expand Up @@ -66,6 +66,21 @@ public void load()
handle = adminView.lookupLdapAuthExperimenter(ctx, userID, this);
}

/**
* Overrides so we can display no LDAP info found.
* Do not show error in that case.
*/
public void handleException(Throwable exc)
{
viewer.setStatus(false);
String s = "Data Retrieval Failure: ";
LogMessage msg = new LogMessage();
msg.print(s);
msg.print(exc);
registry.getLogger().error(this, msg);
viewer.setLDAPDetails(userID, "No LDAP information found");
}

/**
* Cancels the data loading.
* @see EditorLoader#cancel()
Expand Down

0 comments on commit 811f99f

Please sign in to comment.