[hibernate-issues] [Hibernate-JIRA] Commented: (HV-24) Improve the default message of InvalidStateException

Mike Quilleash (JIRA) noreply at atlassian.com
Wed May 30 11:37:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27078 ] 

Mike Quilleash commented on HV-24:
----------------------------------

In my scenario InvalidStateException is generally a programming error (someone forgot to set something).  It is a web application so a lot of validation is handled by Seam and it marks the appropriate control as invalid which is all fine.

But properties and related objects are created or set in the business code (default values etc) and sometimes a developer will forget to set one of these properties.  When the validation fires an exception is caught and is redirected to an exception page with stack trace, component tree, context state etc.  If the InvalidValues (properties and actual values) were in the message of the exception then it would become much faster to determine the problem, rather than having to find the right place to debug in the code.

Additionally, and this is probably more important, outside of development if it happens in production you often only have the stack trace to work with if something really nasty happens so as much information as possible is important.


> Improve the default message of InvalidStateException
> ----------------------------------------------------
>
>                 Key: HV-24
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-24
>             Project: Hibernate Validator
>          Issue Type: Improvement
>          Components: engine
>    Affects Versions: 3.0.0.ga
>         Environment: Any
>            Reporter: Mike Quilleash
>
> Doing a printStackTrace on InvalidStateException does not give the actual invalid values anywhere.  Would greatly improving debugging speed if this was included by default as often this indicates a programming error.  Currently I have to run the code again and debug the right place to find out what the InvalidValues are.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list