<div dir="ltr">"<span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px"> IMO lower level code should throw exceptions if something exceptional happens and let the upper levels decide to retry or report the error."</span><div>
<span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px"><br></span></div><div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px">If this was good programming practice then we wouldn't be having this discussion.   I'd agree about it if exceptions would only remain exceptional.  but programmer's are lazy bastards and will abuse every feature offered to them whenever possible.</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px"><br></span></font></div><div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px">I'd argue that the code shouldn't know it is lower level, and ought to be written defensively.  I watched overspecifed X.400 being blown away by loosy-goosy SMTP precisely because every X.400 vendor thought they were right and every SMTP installation had to deal with whatever came its way.  Opensim is very fragile, and up-chucking exceptions is bound to be part of the problem.</span></font></div>
<div><font color="#1f497d" face="Calibri, sans-serif"><span style="font-size:15px"><br></span></font></div><div><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:15px"><br></span></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Apr 21, 2014 at 11:13 AM, Mike Chase <span dir="ltr"><<a href="mailto:mike.chase@alternatemetaverse.com" target="_blank">mike.chase@alternatemetaverse.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">That’s a shame but I understand.  I don’t understand the resistance to what I guess I consider good programming practice because there seems to be concern about “fixing” code that might be effected.  IMO lower level code should throw exceptions if something exceptional happens and let the upper levels decide to retry or report the error.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Mike<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <a href="mailto:opensim-dev-bounces@opensimulator.org" target="_blank">opensim-dev-bounces@opensimulator.org</a> [mailto:<a href="mailto:opensim-dev-bounces@opensimulator.org" target="_blank">opensim-dev-bounces@opensimulator.org</a>] <b>On Behalf Of </b>Oren Hurvitz<br>
<b>Sent:</b> Monday, April 21, 2014 10:54 AM<br><b>To:</b> <a href="mailto:opensim-dev@opensimulator.org" target="_blank">opensim-dev@opensimulator.org</a><br><b>Subject:</b> Re: [Opensim-dev] Error detection when storing an asset<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">James, the only philosophical concern that I've heard is a desire to hide errors and present a false facade of 100% success to users. This was obfuscated by an attempt to claim that the errors could someday be fixed automatically, but that doesn't actually happen in today's OpenSim so it's not a valid point. Since I respect my users and value their time I have to let them know when I've failed to complete an action that they requested, so I reject this approach.<u></u><u></u></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt">A second possible objection is a practical one: will propagating exceptions cause other parts of the code, unrelated to the assets service, to fail? I don't know the answer to that, but I still refuse to pretend success in cases where I've failed.<br>
<br>For these reasons, I have changed Kitely to propagate exceptions thrown in the communications system; it is already done. If this causes problems then I will see them and fix them. But in view of the surprising and vigorous opposition to this change I will not be contributing it to OpenSim.<br>
<br>Oren<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Mon, Apr 21, 2014 at 5:43 PM, James Stallings II <<a href="mailto:james.stallings@gmail.com" target="_blank">james.stallings@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><div><p class="MsoNormal">Parhaps it would be interesting to hear whether Oren has obtained to some elegant way of addressing these concerns.<u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Cheers<u></u><u></u></p></div></div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">
On Sun, Apr 20, 2014 at 11:08 PM, Trinity <<a href="mailto:trinity93@gmail.com" target="_blank">trinity93@gmail.com</a>> wrote:<u></u><u></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Im in mels camp on this one.<br><br><u></u><u></u></p></div><p class="MsoNormal">Trinity Bays<u></u><u></u></p></div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">
<u></u> <u></u></p><div><p class="MsoNormal">On Sat, Apr 19, 2014 at 4:14 AM, Melanie <<a href="mailto:melanie@t-data.com" target="_blank">melanie@t-data.com</a>> wrote:<u></u><u></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">These "other places" are what I'm worried about. There are a lot of them and each of them would need to have code added. Exception handling code is one of the worst types of code because the "try" is a scope, so locals devlared in the try, like bool result = MethodToTry(); will have to be split up into declaring the bool outside the scope and assigning it inside - incredibly ugly for code that wants to be reference and teaching code as well as a functioning system.<br>
<span style="color:#888888"><br>- Melanie</span><u></u><u></u></p><div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>On 19 Apr 2014, at 08:02, Oren Hurvitz <<a href="mailto:orenh@kitely.com" target="_blank">orenh@kitely.com</a>> wrote:<br>
<br>My fix has two parts.<br><br>The first is that the Store() operation needs to understand failures correctly. There has been a consensus that it should, so I'll add that to Git.<br><br>The second is that MakeRequest() should propagate exceptions, instead of just returning null (which is what it does now). So far there have been 3 votes for this (me, Mike Chase, and Justin) and 2 against (Melanie, Diva). That's very close; does anyone else want to make their position known?<br>
<br>Next, I see that there's confusion in this discussion about what happens in Store() if MakeRequest() throws an exception. And the answer is, nothing will be different, because Store() already correctly catches exceptions. That is precisely how it should work: the low-level communications system reports when it has failed, and higher levels (that know the business value of the call) decide how to handle it. However, MakeRequest() is called from other places as well and they might need to be changed to handle exceptions better.<u></u><u></u></p>
</div></div><div><div><p class="MsoNormal">_______________________________________________<br>Opensim-dev mailing list<br><a href="mailto:Opensim-dev@opensimulator.org" target="_blank">Opensim-dev@opensimulator.org</a><br>
<a href="http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev" target="_blank">http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev</a><br>_______________________________________________<br>Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@opensimulator.org" target="_blank">Opensim-dev@opensimulator.org</a><br><a href="http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev" target="_blank">http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev</a><u></u><u></u></p>
</div></div></blockquote></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@opensimulator.org" target="_blank">Opensim-dev@opensimulator.org</a><br><a href="http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev" target="_blank">http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev</a><u></u><u></u></p>
</blockquote></div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div><p class="MsoNormal"><span><span style="color:#888888">-- <u></u><u></u></span></span></p>
<div><p class="MsoNormal"><span style="color:#888888">===================================</span><u></u><u></u></p><div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:#888888"><a href="http://osgrid.org/" target="_blank">http://osgrid.org/</a><br>
<a href="http://simhost.com" target="_blank">http://simhost.com</a><br><a href="http://twitter.com/jstallings2" target="_blank">http://twitter.com/jstallings2</a><u></u><u></u></span></p></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt">
<br>_______________________________________________<br>Opensim-dev mailing list<br><a href="mailto:Opensim-dev@opensimulator.org" target="_blank">Opensim-dev@opensimulator.org</a><br><a href="http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev" target="_blank">http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev</a><u></u><u></u></p>
</blockquote></div><p class="MsoNormal"><br><br clear="all"><br>-- <u></u><u></u></p><div><p class="MsoNormal">Oren Hurvitz<br>VP R&D<br>Kitely Ltd.<br><br>Email: <a href="mailto:orenh@kitely.com" target="_blank">orenh@kitely.com</a><u></u><u></u></p>
</div></div></div></div><br>_______________________________________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@opensimulator.org">Opensim-dev@opensimulator.org</a><br>
<a href="http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev" target="_blank">http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>No essence.  No permanence.  No perfection.  Only action.
</div>