try {
return new String(string.getBytes("ISO8859-1"), "UTF-8");
} catch (UnsupportedEncodingException e) {
- logger.warn("Unable to UTF-8 decode: " + string);
+ logger.warn("Unable to UTF-8 decode: " , string , e);
return string;
}
}
configs.put(key, (String) props.get(key));
}
} catch (Throwable t) {
- throw new ConfigurationException(null, FEDERATION_CONFIG_ERR);
+ throw new ConfigurationException(null, FEDERATION_CONFIG_ERR, t);
}
}
}
try {
claim = nullableCredService.authenticate(new PasswordCredentialsWrapper(username, password), DOMAIN);
} catch (AuthenticationException e) {
- logger.debug("Authentication failed for user '{}' : {}", username);
+ logger.debug("Authentication failed for user '{}' : {}", username, e);
return false;
}
config.maxEntriesLocalHeap(maxMem);
config.maxEntriesLocalDisk(maxDisk);
} catch (Throwable t) {
- throw new ConfigurationException(null, TOKEN_STORE_CONFIG_ERR);
+ throw new ConfigurationException(null, TOKEN_STORE_CONFIG_ERR, t);
} finally {
cacheLock.unlock();
}
domain = domainList.get(0);
}
catch (StoreException se) {
- throw new AuthenticationException("idm data store exception :" + se.toString());
+ throw new AuthenticationException("idm data store exception :" + se.toString() + se);
}
// check to see user exists and passes cred check
return claim.build();
}
catch (StoreException se) {
- throw new AuthenticationException("idm data store exception :" + se.toString());
+ throw new AuthenticationException("idm data store exception :" + se.toString() + se);
}
}
return user.getUserid().toString();
}
catch (StoreException se) {
- logger.warn("error getting user " + se.toString());
+ logger.warn("error getting user " , se.toString(), se);
return null;
}
}
uid = Integer.parseInt(userId);
}
catch (NumberFormatException nfe) {
- logger.warn("not a valid userid:" + userId);
+ logger.warn("not a valid userid:" ,userId, nfe);
return domains;
}
try {
return domains;
}
catch (StoreException se) {
- logger.warn("error getting domains " + se.toString());
+ logger.warn("error getting domains " , se.toString(), se);
return domains;
}
uid = Integer.parseInt(userId);
}
catch (NumberFormatException nfe) {
- logger.warn("not a valid userid:" + userId);
+ logger.warn("not a valid userid:" ,userId, nfe);
return roles;
}
return roles;
}
catch (StoreException se) {
- logger.warn("error getting roles " + se.toString());
+ logger.warn("error getting roles " , se.toString(), se);
return roles;
}
}
mapping = map;
} catch (java.lang.ClassCastException e) {
throw new InvalidRuleException(String.format("%s rule defines 'mapping' but it is not a Map",
- this.ruleId(namespace)));
+ this.ruleId(namespace), e));
}
if (mapping != null) {
return mapping;
mappingName = (String) rule.get("mapping_name");
} catch (java.lang.ClassCastException e) {
throw new InvalidRuleException(String.format(
- "%s rule defines 'mapping_name' but it is not a string", this.ruleId(namespace)));
+ "%s rule defines 'mapping_name' but it is not a string", this.ruleId(namespace), e));
}
if (mappingName == null) {
throw new InvalidRuleException(String.format(
} catch (IndexOutOfBoundsException e) {
throw new InvalidRuleException(String.format(
"verb '%s' requires at least %d items but only %d are available.", verb, index + 1,
- statement.size()));
+ statement.size(), e));
}
try {
} catch (IndexOutOfBoundsException e) {
throw new InvalidRuleException(String.format(
"verb '%s' requires at least %d items but only %d are available.", verb, index + 1,
- statement.size()));
+ statement.size(), e));
}
try {
} catch (IndexOutOfBoundsException e) {
throw new InvalidRuleException(String.format(
"verb '%s' requires at least %d items but only %d are available.", verb, index + 1,
- statement.size()));
+ statement.size(),e));
}
if (tokenTypes != null) {
} catch (IndexOutOfBoundsException e) {
throw new InvalidRuleException(String.format(
"verb '%s' requires at least %d items but only %d are available.", verb, index + 1,
- statement.size()));
+ statement.size(), e));
}
try {
} catch (ClassCastException e) {
throw new InvalidValueException(String.format(
"verb '%s' failed, array item (%s) is not a string, array=%s", verb, item,
- parameter.getObjectValue()));
+ parameter.getObjectValue(), e));
}
newItem = oldItem.toLowerCase();
newValue.add(newItem);
} catch (ClassCastException e) {
throw new InvalidValueException(String.format(
"verb '%s' failed, array item (%s) is not a string, array=%s", verb, item,
- parameter.getObjectValue()));
+ parameter.getObjectValue(), e));
}
newItem = oldItem.toUpperCase();
newValue.add(newItem);
String
.format(
"variable '%s' is an array indexed by '%s', however the index cannot be converted to an integer",
- this.name, index));
+ this.name, index,e));
}
} else {
throw new InvalidTypeException(
String
.format(
"variable '%s' is an array of size %d indexed by '%s', however the index is out of bounds",
- this.name, list.size(), idx));
+ this.name, list.size(), idx, e));
}
} else if (base instanceof Map) {
@SuppressWarnings("unchecked")
String
.format(
"variable '%s' is an array indexed by '%s', however the index cannot be converted to an integer",
- this.name, index));
+ this.name, index, e));
}
} else {
throw new InvalidTypeException(
String
.format(
"variable '%s' is an array of size %d indexed by '%s', however the index is out of bounds",
- this.name, list.size(), idx));
+ this.name, list.size(), idx, e));
}
} else if (base instanceof Map) {
@SuppressWarnings("unchecked")
public Object getObjectValue() {
return this.value;
}
-
-
-
}