<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Can you give me an example on how to create new exception and call/use that exception in my program? I try to googling but don't seem to find one. Thanks.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Original Message ----<br>From: Randal L. Schwartz &lt;merlyn@stonehenge.com&gt;<br>To: Alex Chi &lt;alex_chi99@yahoo.com&gt;<br>Cc: beginners@lists.squeakfoundation.org<br>Sent: Thursday, October 9, 2008 3:53:44 PM<br>Subject: Re: [Newbies] How to create new exception<br><br>
&gt;&gt;&gt;&gt;&gt; "Alex" == Alex Chi &lt;<a ymailto="mailto:alex_chi99@yahoo.com" href="mailto:alex_chi99@yahoo.com">alex_chi99@yahoo.com</a>&gt; writes:<br><br>Alex&gt; As a beginner in smalltalk I have a problem on how to create new<br>Alex&gt; exception class.&nbsp; For example I want to create FileNotFoundError, I have<br>Alex&gt; create a new class FileNotFoundError uner class Error. But then I get<br>Alex&gt; confuse where to write the description or defaultAction of my new<br>Alex&gt; exception?<br><br>Looks like both #description and #defaultAction are instance-side<br>methods of the classes under Exception.<br><br>So you'd define it as an instance-side method in your FileNotFound error.<br><br>You do realize that FileDoesNotExistException already exists?&nbsp; Can<br>you just use that?<br><br>-- <br>Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095<br>&lt;<a ymailto="mailto:merlyn@stonehenge.com"
 href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>&gt; &lt;URL:<a href="http://www.stonehenge.com/merlyn/" target="_blank">http://www.stonehenge.com/merlyn/</a>&gt;<br>Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.<br>See <a href="http://methodsandmessages.vox.com/" target="_blank">http://methodsandmessages.vox.com/</a> for Smalltalk and Seaside discussion<br></div></div></div><br>

      </body></html>