Re: Destroyed DataSet exception ?
anthony berglas <[email protected]> Fri, 20 Sep 2013 10:19:40 +1000
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Message-ID | <CA+_PZMcXOgXPL6ZxJ74icj9abKFZQ5mCnA3=BahmYy+DzG8wHA@mail.gmail.com> |
--047d7bb04946c41a1004e6c5a276 Content-Type: text/plain; charset=ISO-8859-1 If there was a lot of dependent code, then create a new method which throws the exception and deprecate the old one. But in this case it is probably OK to just change the old one. Java APIs do this all the time, return null for not found, producing meaningless null pointer exceptions. .Net generally does that better. Anthony On Thu, Sep 19, 2013 at 8:37 PM, Franck Routier <[email protected]>wrote: > Hi, > > that's what I think as well, but notice this will impact code that relies > on the current behaviour and checks for null to handle the case of a > destroyed dataset. > Such code will then have to handle the SExceptionError instead... > > Franck > > -- Dr Anthony Berglas, [email protected] Mobile: +61 4 4838 8874 Just because it is possible to push twigs along the ground with ones nose does not necessarily mean that that is the best way to collect firewood. --047d7bb04946c41a1004e6c5a276 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <head> <style type=3D"text/css"> <!-- /* start of attachment style */ .ygrp-photo-title{ clear: both; font-size: smaller; height: 15px; overflow: hidden; text-align: center; width: 75px; } div.ygrp-photo{ background-position: center; background-repeat: no-repeat; background-color: white; border: 1px solid black; height: 62px; width: 62px; } div.photo-title=20 a, div.photo-title a:active, div.photo-title a:hover, div.photo-title a:visited { text-decoration: none;=20 } div.attach-table div.attach-row { clear: both; } div.attach-table div.attach-row div { float: left; /* margin: 2px;*/ } p { clear: both; padding: 15px 0 3px 0; overflow: hidden; } div.ygrp-file { width: 30px; valign: middle; } div.attach-table div.attach-row div div a { text-decoration: none; } div.attach-table div.attach-row div div span { font-weight: normal; } div.ygrp-file-title { font-weight: bold; } /* end of attachment style */ --> </style> </head> <html> <head> <style type=3D"text/css"> <!-- #ygrp-mkp { border: 1px solid #d8d8d8; font-family: Arial; margin: 10px 0; padding: 0 10px; } #ygrp-mkp hr { border: 1px solid #d8d8d8; } #ygrp-mkp #hd { color: #628c2a; font-size: 85%; font-weight: 700; line-height: 122%; margin: 10px 0; } #ygrp-mkp #ads { margin-bottom: 10px; } #ygrp-mkp .ad { padding: 0 0; } #ygrp-mkp .ad p { margin: 0; } #ygrp-mkp .ad a { color: #0000ff; text-decoration: none; } --> </style> </head> <body> <div dir=3D"ltr">If there was a lot of dependent code, then create a new me= thod which throws the exception and deprecate the old one. =A0But in this c= ase it is probably OK to just change the old one.<div><br></div><div>Java A= PIs do this all the time, return null for not found, producing meaningless = null pointer exceptions. =A0.Net generally does that better.</div> <div><br></div><div>Anthony</div></div><div class=3D"gmail_extra"><br><br><= div class=3D"gmail_quote">On Thu, Sep 19, 2013 at 8:37 PM, Franck Routier <= span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"= _blank">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Hi,<br> <br> that's what I think as well, but notice this will impact code that reli= es on the current behaviour and checks for null to handle the case of a des= troyed dataset.<br> Such code will then have to handle the SExceptionError instead...<span clas= s=3D"HOEnZb"><font color=3D"#888888"><br> <br> Franck<br> <br> </font></span></blockquote></div><br><br clear=3D"all"><div><br></div>-- <b= r><p> </p><p>Dr Anthony Berglas, <a href=3D"mailto:[email protected]" target=3D= "_blank">[email protected]</a>=A0=A0=A0=A0=A0=A0 Mobile: +61 4 4838 8874<= br> Just because it is possible to push twigs along the ground with ones nose<b= r> does not necessarily mean that that is the best way to collect firewood.</p= > </div> <!-- |**|begin egp html banner|**| --> <br> <br> <!-- |**|end egp html banner|**| --> <div width=3D"1" style=3D"color: white; clear: both;"/>__._,_.___</div> =20=20=20=20=20=20 =20=20=20=20=20=20 <!-- Start Recommendations --> <!-- End Recommendations --> <!-- |**|begin egp html banner|**| --> <img src=3D"http://geo.yahoo.com/serv?s=3D97476590/grpId=3D7360226/grpspI= d=3D1705006905/msgId=3D2091/stime=3D1379636433" width=3D"1" height=3D"1"> <= br> <!-- |**|end egp html banner|**| --> =20=20 <!-- |**|begin egp html banner|**| --> <br> <div style=3D"font-family: verdana; font-size: 77%; border-top: 1px s= olid #666; padding: 5px 0;" > Your email settings: Individual Email|Traditional <br> <a href=3D"http://groups.yahoo.com/group/SimpleORM/join;_ylc=3DX3oDMT= JmYzk5bWx0BF9TAzk3NDc2NTkwBGdycElkAzczNjAyMjYEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlY= wNmdHIEc2xrA3N0bmdzBHN0aW1lAzEzNzk2MzY0MzM-">Change settings via the Web</a= > (Yahoo! ID required) <br> Change settings via email: <a href=3D"mailto:SimpleORM-digest@yahoogr= oups.com?subject=3DEmail Delivery: Digest">Switch delivery to Daily Digest<= /a> | <a href =3D "mailto:[email protected]?subject=3D= Change Delivery Format: Fully Featured">Switch to Fully Featured</a> <br> <a href=3D"http://groups.yahoo.com/group/SimpleORM;_ylc=3DX3oDMT= Jkc3EwYXJ2BF9TAzk3NDc2NTkwBGdycElkAzczNjAyMjYEZ3Jwc3BJZAMxNzA1MDA2OTA1BHNlY= wNmdHIEc2xrA2hwZgRzdGltZQMxMzc5NjM2NDMz"> Visit Your Group=20 </a> | <a href=3D"http://info.yahoo.com/legal/us/yahoo/utos/terms/"> Yahoo! Groups Terms of Use </a> | <a href=3D"mailto:[email protected]?subject=3DUns= ubscribe"> Unsubscribe=20 </a>=20 <br> </div> <br> <!-- |**|end egp html banner|**| --> <div style=3D"color: white; clear: both;"/>__,_._,___</div> </body> </html> --047d7bb04946c41a1004e6c5a276--