Path: news.daimi.aau.dk!news.uni-c.dk!newsfeed.sunet.se!news01.sunet.se!sunic!newsfeed.ACO.net!swidir.switch.ch!in2p3.fr!oleane!plug.news.pipex.net!pipex!tank.news.pipex.net!pipex!newsfeed.internetmci.com!news1.erols.com!news2.cais.net!news.cais.net!nntp.uio.no!ifi.uio.no!usenet From: Ola Fosheim Groestad Newsgroups: comp.lang.beta Subject: Re: exception in BETA Date: Sun, 14 Apr 1996 10:54:20 +0200 Organization: Nei! Lines: 44 Message-ID: <3170BD3C.20D7@ifi.uio.no> References: NNTP-Posting-Host: birk32.studby.uio.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 2.01Gold (Win95; I) Russell Mok wrote: > 1. Exception propagation (to the caller) is not easily supported in > BETA and basically Knudsen's intention of developing the static > exception handling was to have a handler independent of the call > chain. Does anyone find the absence of exception propagation a > good/bad feature? Why? Well, as exceptions in Beta seem to be plain virtuals that are bound I have the following problem. A pattern might provide several exceptions, some inherited from superpatterns, so if you are only interested in knowing whether there was an error or not, you really have to bind all possible errors. I know that this could be circumvented by clever programming when the classes are designed, but.. It would have been a lot easier if Beta had a mechanism to "hand-out" some kind of pattern that described the error, possibly with internal methods to be called if you want to resume, cancel the original "request" and a method to be called when you cannot handle the error. > 2. Obviously, BETA patten can mimic the dynamic approach, I > believe it is possible with a feature like LEAVE. Is this correct? I think there is some limitations on how beta handles leave as for now. What seems to be the way it is handled is something like this: L:(# ok:@boolean; do true->ok; badfunctioncall(# onerror::(# do false->ok; true->continue #); #); (if not ok then leave L (* or call an exception in L *) if); #) > 3. How often do you use the mimicked dynamic approach? Do you think it > should be a built-in feature? The above way of dealing with it is used often, especially with file-access. > 4. Do you think the static approach alone is sufficient and easy > enough to use? It might be if it was used differently in the Mjølner libs. It puts more load on the library implementor though.. (these are my experiences, I hope you get other views on this :)