Software Architecture Prof. Dr. Bertrand Meyer. Lecture 6: Exception Handling. What is an exception?. “An abnormal event” Not a very precise definition Informally: something that you don’t want to happen…. Exception vocabulary. “ Raise ”, “trigger” or “throw” an exception
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Software ArchitectureProf. Dr. Bertrand Meyer
Lecture 6: Exception Handling
Fails, triggering an exception in r (r is recipient of exception).
In Eiffel & Spec#, will go away
such that r () = and for any subsetsXandYof A,r (XY)=r (X)r (Y)
The set of relations from A to B is also written
For r AB XA
the setr (X)is called the image of Xbyr
The set of functions from A to B is written
The domain of a function fA B , written domainf,is the largest subset XAsuch that fX B
For fA Band a A, we may write
(as for a total function)
if we prove that a domainf
attemptlocaleven: BOOLEANdoifeventhenalgorithm_2elsealgorithm_1endrescueeven := noteven; retryend