mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-03-09 06:50:05 +00:00
Improved solution to 1.4-compatible IllegalArgumentException with "cause" exception (as suggested on dev list).
This commit is contained in:
parent
fbe5957c23
commit
9062b4c352
@ -60,8 +60,9 @@ public class LdapUtils {
|
||||
try {
|
||||
return new URI(url);
|
||||
} catch (URISyntaxException e) {
|
||||
logger.error("Failed to parse url " + url, e);
|
||||
throw new IllegalArgumentException("Unable to parse url: " + url);
|
||||
IllegalArgumentException iae = new IllegalArgumentException("Unable to parse url: " + url);
|
||||
iae.initCause(e);
|
||||
throw iae;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user