Menu

#522 Throw a more meaningful exception when failing to configure

Needs_Review
closed
nobody
cdk-1.4.x (181)
5
2012-10-28
2012-07-01
No

A fix for this bug:

https://sourceforge.net/tracker/?func=detail&aid=3534288&group_id=20024&atid=120024

The patch makes it throw a IllegalArgumentException...

It's a bug fix, but also an API change... the change lies in a previously undocumented feature in that it fails when a non-existing element is attempted to be configured.

I think this should go into cdk-1.4.x but two (or more) pair of eyes are welcome to review it!

Discussion

  • Rajarshi Guha

    Rajarshi Guha - 2012-07-01

    Looks OK to me, though I wonder whether IllegalArgumentException is the correct way to handle this (since I figured this type of exception would relate to cases where argumens are of the wrong type). \

    Rather, would a CDKException be a better choice?

     
  • Rajarshi Guha

    Rajarshi Guha - 2012-07-01

    Looks OK to me, though I wonder whether IllegalArgumentException is the correct way to handle this (since I figured this type of exception would relate to cases where argumens are of the wrong type). \

    Rather, would a CDKException be a better choice?

     
  • Egon Willighagen

    My rebuttal would be that in cdk-1.4.x throwing CDKException is not
    possible, as that would change the API... with the IllegalArgumentException
    I did not have to change the API by adding a throws clause...

     
  • John May

    John May - 2012-08-02
     
  • Egon Willighagen

    Pushed.

     

Log in to post a comment.