<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Thanks for the fast feedback, I am going to commit this to the Inbox!</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
<div class="_rp_T4" id="Item.MessagePartBody"><br>
</div>
<div class="_rp_T4" id="Item.MessagePartBody">> <span style="font-size: 12pt;">Making it an error might also make smalltalkCI (through SUnit) catch it to continue. Failing the tests rather than halting the run.</span>
<div><br>
</div>
<div>Exactly, that was also my original motivation to ask this question :-)</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Eliot Miranda <eliot.miranda@gmail.com><br>
<b>Gesendet:</b> Donnerstag, 9. April 2020 17:03:59<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] Why is ModificationForbidden not an Error?</font>
<div> </div>
</div>
<div>Hi Christoph,<br>
<div dir="ltr"><br>
</div>
<div dir="ltr"><br>
<blockquote type="cite">On Apr 9, 2020, at 7:01 AM, Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi all,</p>
<p><br>
</p>
<p>please take a short look at this behavior:</p>
<p><br>
</p>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<p><span>TestRunner openForSuite: MorphicUIManagerTest suite. "Run Selected"</span></p>
</blockquote>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;">
<div style="">
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;"><br>
</div>
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;">At the moment (#<span>19541), a bug in FileList2 class >> #<span>endingSpecs (which I'm going to fix ASAP) breaks the test #<span>testShowAllBinParts. But because ModificationForbidden is
 not an Error, it is not caught by the TestRunner so the whole suite run blows up, too.</span></span></span></div>
<div class="_rp_T4" id="Item.MessagePartBody" style=""><span style="font-size: 12pt;">I could make another example by triggering a ModificationForbidden in a #drawOn: method to destroy the whole image</span><span style="font-size: 12pt;">, too.</span><br>
<span style="font-size: 8pt;">(Morph newSubclass </span><span style="font-size: 8pt;">compile: 'drawOn: x #(1) at: 1 put: 2'; </span><span style="font-size: 8pt;">new) openInHand)</span></div>
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;"><span><span><span><br>
</span></span></span></div>
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;"><span><span><span>So my question is:</span></span></span><span style="font-size: 12pt;"> Why
</span><span style="font-size: 12pt;">doesn't </span><span style="font-size: 12pt;">ModificationForbidden derive from Error? Isn't it actually an error? Similar illegal operations such as "#() at: 0" or "{} at: 1 put: #foo" raise some kind of Error, too. Everything
 I learned so far about Squeak's exception framework tells me that you should have a very good reason if you design an exception neither to derive from Error, nor from Notification. At the moment, we only do have 9 exceptions (bad pun ...) to this rule (and
 I'm not even sure whether <span>MCNoChangesException couldn't be a notification, and Abort does not even have senders in the Trunk)</span>.</span></div>
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;"><span style="font-size: 12pt;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">I'd be happy if you could give me some </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">pointers
 on why <span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">ModificationForbidden does not follow this rule. How can we deal with this in order to fix the bugs/unexpected behaviors mentioned above?</span></span><br>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
I think this is an oversight in my part.  I agree that <span style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;">ModificationForbidden is an error.  I took the code from Pharo and didn’t notice </span><span style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;">ModificationForbidden
 was a Notification.</span>
<div><font face="Calibri, Arial, Helvetica, sans-serif" size="3"><br>
</font></div>
<div><font face="Calibri, Arial, Helvetica, sans-serif" size="3">Please feel free to make it an Error.<br>
</font>
<div><font face="Calibri, Arial, Helvetica, sans-serif" size="3"><br>
</font>
<blockquote type="cite">
<div dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;">
<div style="">
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;"><span style="font-size: 12pt;"></span></div>
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;"><span><span><span><br>
</span></span></span></div>
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;"><span><span><span>Possibly related stuff:</span></span></span></div>
<div class="_rp_T4" id="Item.MessagePartBody" style="font-size: 12pt;">
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li><span><span><span><span><a href="http://forum.world.st/Squeak-s-AssertionFailure-vs-SUnit-s-TestFailure-td5106818.html" class="OWAAutoLink" id="LPlnk263411" previewremoved="true">http://forum.world.st/Squeak-s-AssertionFailure-vs-SUnit-s-TestFailure-td5106818.html</a></span></span></span></span></li><li><span><span><span><a href="http://forum.world.st/The-Trunk-Kernel-eem-1294-mcz-td5112196.html" class="OWAAutoLink" id="LPlnk925125" previewremoved="true">http://forum.world.st/The-Trunk-Kernel-eem-1294-mcz-td5112196.html</a></span></span></span></li><li><span><span><span><a href="http://forum.world.st/The-Trunk-Kernel-eem-1317-mcz-tp5113273p5113433.html" class="OWAAutoLink" id="LPlnk941283" previewremoved="true">http://forum.world.st/The-Trunk-Kernel-eem-1317-mcz-tp5113273p5113433.html</a><br>
</span></span></span></li></ul>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
</div>
</div>
<div style="font-size: 12pt;"><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<span></span><br>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>