<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>See below:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></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"'> opensim-dev-bounces@opensimulator.org [mailto:opensim-dev-bounces@opensimulator.org] <b>On Behalf Of </b>Jim Williams<br><b>Sent:</b> Monday, April 21, 2014 11:57 AM<br><b>To:</b> opensim-dev@opensimulator.org<br><b>Subject:</b> Re: [Opensim-dev] Error detection when storing an asset<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>No!  The lower level code should return what happened, and there is nothing which is "exceptional" except some children; which is the right way to view the notion of exceptions -- dim-witted.  Given that the stupid idea was invented, I must admit that sometimes there is no real choice but to accept the crappy code and propagate the crap -- but there is no reason to do so willingly.  The try/catch scheme is bad practice.  How to deal with the crap that is out there is a matter which can be discussed, but not with the notion that is was done right to begin with.<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Then design the api to return success/failure as a return result.  Point is, you don’t choose to gleefully ignore error details from a lower level.  I get that you don’t like exceptions.  And that there is long standing religious debates on how they should be used.  My point wasn’t so much about the mechanism as the approach.  Lower level code returns success/failure and upper level code decides what to do.<o:p></o:p></span></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It goes along with thinking that objects are somehow special.  Took me years to figure out that objects were simply good programming practice with a bit of crap tossed in to confuse people.  (BTW-- I worked at Object Design.  I know what a C++ object is better than you do.)<o:p></o:p></p></div><div><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I wouldn’t necessarily make that assumption.  You don’t know what I’ve done in my career.   I was a long time user of Object Design though and am well aware of the issues it had with exceptions unwinding the stack.   Just because C++ exception handling sucked for many years though doesn’t necessarily mean exceptions==bad.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Mike<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>P.S. As Hiro pointed out, I’m not a core member just an interested techie with an opinion who is trying to share it.  <o:p></o:p></span></p><div><p class=MsoNormal><o:p> </o:p></p></div></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Mon, Apr 21, 2014 at 11:13 AM, Mike Chase <<a href="mailto:mike.chase@alternatemetaverse.com" target="_blank">mike.chase@alternatemetaverse.com</a>> wrote:<o:p></o:p></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='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Mike</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;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.<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;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<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Parhaps it would be interesting to hear whether Oren has obtained to some elegant way of addressing these concerns.<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Cheers<o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>On Sun, Apr 20, 2014 at 11:08 PM, Trinity <<a href="mailto:trinity93@gmail.com" target="_blank">trinity93@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>Im in mels camp on this one.<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Trinity Bays<o:p></o:p></p></div><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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><o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;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.<o:p></o:p></p></div></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>_______________________________________________<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><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;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><o:p></o:p></p></blockquote></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'>-- </span><o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'>===================================</span><o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;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></span><o:p></o:p></p></div></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;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><o:p></o:p></p></blockquote></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br><br clear=all><br>-- <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Oren Hurvitz<br>VP R&D<br>Kitely Ltd.<br><br>Email: <a href="mailto:orenh@kitely.com" target="_blank">orenh@kitely.com</a><o:p></o:p></p></div></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">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><o:p></o:p></p></blockquote></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <br>No essence.  No permanence.  No perfection.  Only action. <o:p></o:p></p></div></div></body></html>