You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2021/06/27 14:52:00 UTC

[jira] [Commented] (POOL-395) Improve exception thrown in GenericObjectPool.borrowObject when pool is exhausted

    [ https://issues.apache.org/jira/browse/POOL-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17370235#comment-17370235 ] 

Gary D. Gregory commented on POOL-395:
--------------------------------------

In order to not overwhelm users with long messages, you enable statistics for these exception messages with {{BaseGenericObjectPool.setMessagesStatistics(boolean)}}.

> Improve exception thrown in GenericObjectPool.borrowObject when pool is exhausted
> ---------------------------------------------------------------------------------
>
>                 Key: POOL-395
>                 URL: https://issues.apache.org/jira/browse/POOL-395
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 2.9.0
>            Reporter: Arash Nikoo
>            Priority: Minor
>
> It would be really nice to include some additional information for the following exception:
> {code:java}
> org.apache.commons.pool2.impl.GenericObjectPool.borrowObject
> java.util.NoSuchElementException: Pool exhausted{code}
>  
> I suggest showing the following parameters in the exception message:
>  Min=x, Max=x, MinIdle=x, MaxIdle=x, Current=x



--
This message was sent by Atlassian Jira
(v8.3.4#803005)