本文整理汇总了Java中gov.nih.nci.cagrid.common.Utils.getExceptionMessage方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.getExceptionMessage方法的具体用法?Java Utils.getExceptionMessage怎么用?Java Utils.getExceptionMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nih.nci.cagrid.common.Utils
的用法示例。
在下文中一共展示了Utils.getExceptionMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: check
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void check(SAMLAssertion saml, Exception e) throws Exception {
if (e == null) {
throw new Exception(
"No error was received when one was expected!!!");
}
if ((!error.equals(e.getClass()))) {
throw new Exception(
"Did not receive the expected error type in authenticating.\nThe error expected was:\n"
+ error.getName()
+ "\nThe error received was:\n"
+ e.getClass().getName());
} else if ((this.errorMessage != null)
&& (Utils.getExceptionMessage(e).indexOf(this.errorMessage) == -1)) {
throw new Exception(
"Did not receive the expected error message in authenticating.\nThe error expected was:\n"
+ this.errorMessage
+ "\nThe error received was:\n"
+ Utils.getExceptionMessage(e));
}
}
示例2: DorianImpl
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public DorianImpl() throws RemoteException {
try {
EndpointReferenceType type = AddressingUtils.createEndpointReference(null);
String configFile = DorianConfiguration.getConfiguration().getDorianConfiguration();
String propertiesFile = DorianConfiguration.getConfiguration().getDorianProperties();
BeanUtils utils = new BeanUtils(new FileSystemResource(configFile), new FileSystemResource(propertiesFile));
DorianProperties conf = utils.getDorianProperties();
this.dorian = new Dorian(conf, type.getAddress().toString());
getResourceHome().getAddressedResource().setDorian(this.dorian);
QName[] list = new QName[1];
list[0] = AuthenticationProfile.BASIC_AUTHENTICATION;
AuthenticationProfiles profiles = new AuthenticationProfiles();
profiles.setProfile(list);
getResourceHome().getAddressedResource().setAuthenticationProfiles(profiles);
utils.getEventManager().logEvent(AuditConstants.SYSTEM_ID, AuditConstants.SYSTEM_ID,
FederationAudit.SystemStartup.getValue(), "System successfully started!!!");
} catch (Exception e) {
FaultHelper.printStackTrace(e);
throw new RemoteException(Utils.getExceptionMessage(e));
}
}
示例3: runStep
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
@Override
public void runStep() throws Throwable {
assertNotNull(this.credential);
assertNotNull(this.credential.getGridCredential());
assertNotNull(this.delegatedCredential);
assertNotNull(this.delegatedCredential
.getDelegatedCredentialReference());
assertNotNull(this.expectedError);
DelegatedCredentialUserClient client = new DelegatedCredentialUserClient(
this.delegatedCredential.getDelegatedCredentialReference(),
this.credential.getGridCredential());
try {
client.getDelegatedCredential();
fail("Should not be able to get delegated credential.");
} catch (Exception e) {
String error = Utils.getExceptionMessage(e);
if (error.indexOf(expectedError)==-1) {
fail("Unexpected error encountered:\nEXPECTED:" + expectedError
+ "\n RECEIVED:" + error);
}
}
}
示例4: PhotoSharingGridGrouper
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public PhotoSharingGridGrouper(String serviceURI, boolean preferAnonymous) {
super(serviceURI, null);
try {
this.getClient().setAnonymousPrefered(preferAnonymous);
} catch (Exception e) {
getLog().error(e.getMessage(), e);
throw new GrouperRuntimeException(Utils.getExceptionMessage(e));
}
}
示例5: showError
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public static void showError(Throwable ex) {
String message = Utils.getExceptionMessage(ex);
if (message == null) {
message = "Unknown Error";
}
showError(message, ex);
}
示例6: remove
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void remove() throws ResourceException {
try {
this.cds.suspendDelegatedCredential(getCallerIdentity(), id);
} catch (Exception e) {
e.printStackTrace();
throw new ResourceException(Utils.getExceptionMessage(e), e);
}
}
示例7: toSubject
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public Subject toSubject() throws GrouperRuntimeException {
try {
return SubjectUtils.getSubject(des);
} catch (Exception e) {
getLog().error(e.getMessage(), e);
throw new GrouperRuntimeException(Utils.getExceptionMessage(e));
}
}
示例8: requestMembership
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void requestMembership() throws InsufficientPrivilegeException, MemberAddException {
try {
gridGrouper.getClient().addMembershipRequest(getGroupIdentifier());
} catch (RemoteException e) {
getLog().error(e.getMessage(), e);
throw new GrouperRuntimeException(Utils.getExceptionMessage(e));
}
}
示例9: clear
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void clear() throws EventHandlingException {
try {
this.clearDatabase();
} catch (Exception e) {
throw new EventHandlingException(Utils.getExceptionMessage(e), e);
}
}
示例10: GridGrouper
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
/**
* Used to Construct a Grid Grouper object corresponding to a Grid Grouper
* Service.
*
* @param serviceURI
* The service URI of the Grid Grouper service.
* @param cred
* The grid credential to use to authenticate to the Grid Grouper
* Service.
*/
public GridGrouper(String serviceURI, GlobusCredential cred) {
try {
GridGrouperClient c = new GridGrouperClient(serviceURI,cred);
if(cred==null){
c.setAnonymousPrefered(true);
}else{
c.setAnonymousPrefered(false);
}
this.setClient(c);
} catch (Exception e) {
getLog().error(e.getMessage(), e);
throw new GrouperRuntimeException(Utils.getExceptionMessage(e));
}
}
示例11: isMember
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public boolean isMember(String member, MembershipExpression exp) {
try {
return getClient().isMember(member, exp);
} catch (Exception e) {
getLog().error(e.getMessage(), e);
throw new GrouperRuntimeException(Utils.getExceptionMessage(e));
}
}
示例12: getGroup
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public GroupI getGroup() {
if (group == null) {
try {
group = grouper.findGroup(this.priv.getGroupName());
} catch (Exception e) {
this.getLog().error(e.getMessage(), e);
throw new GrouperRuntimeException(Utils.getExceptionMessage(e));
}
}
return group;
}
示例13: getOwner
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public Subject getOwner() {
try {
return SubjectUtils.getSubject(priv.getOwner());
} catch (Exception e) {
this.getLog().error(e.getMessage(), e);
throw new GrouperRuntimeException(Utils.getExceptionMessage(e));
}
}
示例14: getSubject
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public Subject getSubject() {
try {
return SubjectUtils.getSubject(priv.getSubject());
} catch (Exception e) {
this.getLog().error(e.getMessage(), e);
throw new GrouperRuntimeException(Utils.getExceptionMessage(e));
}
}
示例15: execute
import gov.nih.nci.cagrid.common.Utils; //导入方法依赖的package包/类
public void execute() {
try {
DelegationUserClient client = cds.getUserClient(proxy);
table.addDelegationDescriptors(client.findCredentialsDelegatedToClient());
isSuccessful = true;
} catch (Exception e) {
error = Utils.getExceptionMessage(e);
}
}