Include actual cause's message in various parsing exception messages

This change improves the message of several parsing-related exceptions
that would previously entirely swallow the original exception's message
and sometimes have a slightly misleading message as a result.

This is done by appending the cause's `toString` representation to the
IllegalArgumentException messages instead of an hardcoded "cause".

Closes gh-32636
This commit is contained in:
xumengqi
2024-04-14 23:21:19 +08:00
committed by Simon Baslé
parent 3971632415
commit bf3278596c
2 changed files with 4 additions and 4 deletions

View File

@@ -207,7 +207,7 @@ public class DefaultTransactionAttribute extends DefaultTransactionDefinition im
}
catch (RuntimeException ex) {
throw new IllegalArgumentException(
"Invalid timeoutString value \"" + timeoutString + "\" - cannot parse into int");
"Invalid timeoutString value \"" + timeoutString + "\"; " + ex);
}
}
}