You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Thomas (JIRA)" <ji...@apache.org> on 2011/08/17 19:12:27 UTC
[jira] [Resolved] (POOL-148) borrowObject should return the
exception thrown by validateObject when throwing an Exception to let
Exceptions be handled at a higher level
[ https://issues.apache.org/jira/browse/POOL-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Thomas resolved POOL-148.
------------------------------
Resolution: Fixed
Assignee: Mark Thomas
This was addressed in the pool2 re-factoring.
> borrowObject should return the exception thrown by validateObject when throwing an Exception to let Exceptions be handled at a higher level
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: POOL-148
> URL: https://issues.apache.org/jira/browse/POOL-148
> Project: Commons Pool
> Issue Type: Bug
> Affects Versions: 1.5.2
> Environment: All
> Reporter: Monsieur EDI
> Assignee: Mark Thomas
> Fix For: 2.0
>
>
> public Object borrowObject() throws Exception {
> ...
> try {
> ...
> if(newlyCreated) {
> throw new NoSuchElementException("Could not create a validated object, cause: " + e.getMessage());
> }
> SHOULD BE CHANGED TO :
> if(newlyCreated) {
> throw new Exception("Could not create a validated object", e);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira