异常处理和面向对象编程:走向合成

C. Dony
{"title":"异常处理和面向对象编程:走向合成","authors":"C. Dony","doi":"10.1145/97945.97984","DOIUrl":null,"url":null,"abstract":"The paper presents a discussion and a specification of an exception handling system dedicated to object-oriented programming. We show how a full object-oriented representation of exceptions and of protocols to handle them, using meta-classes, makes the system powerful as well as extendible and solves many classical exception handling issues. We explain the interest for object-oriented programming of handlers attached to classes and to expressions. We propose an original algorithm for propagating exceptions along the invocation chain which takes into account, at each stack level, both kind of handlers. Any class can control which exceptions will be propagated out of its methods; any method can provide context-dependant answers to exceptional events. The whole specification and some keys of our Smalltalk implementation are presented in the paper.","PeriodicalId":135062,"journal":{"name":"OOPSLA/ECOOP '90","volume":"17 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1990-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"76","resultStr":"{\"title\":\"Exception handling and object-oriented programming: towards a synthesis\",\"authors\":\"C. Dony\",\"doi\":\"10.1145/97945.97984\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The paper presents a discussion and a specification of an exception handling system dedicated to object-oriented programming. We show how a full object-oriented representation of exceptions and of protocols to handle them, using meta-classes, makes the system powerful as well as extendible and solves many classical exception handling issues. We explain the interest for object-oriented programming of handlers attached to classes and to expressions. We propose an original algorithm for propagating exceptions along the invocation chain which takes into account, at each stack level, both kind of handlers. Any class can control which exceptions will be propagated out of its methods; any method can provide context-dependant answers to exceptional events. The whole specification and some keys of our Smalltalk implementation are presented in the paper.\",\"PeriodicalId\":135062,\"journal\":{\"name\":\"OOPSLA/ECOOP '90\",\"volume\":\"17 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1990-09-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"76\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"OOPSLA/ECOOP '90\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/97945.97984\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"OOPSLA/ECOOP '90","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/97945.97984","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 76

摘要

本文讨论了一个面向对象程序设计的异常处理系统,并给出了具体说明。我们展示了如何使用元类对异常和处理异常的协议进行完整的面向对象表示,使系统功能强大、可扩展,并解决了许多经典的异常处理问题。我们解释了附加到类和表达式的处理程序对面向对象编程的兴趣。我们提出了一种原始算法,用于沿调用链传播异常,该算法在每个堆栈级别都考虑到两种处理程序。任何类都可以控制哪些异常将从其方法中传播出去;任何方法都可以为异常事件提供与上下文相关的答案。本文给出了Smalltalk实现的整个规范和一些关键。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Exception handling and object-oriented programming: towards a synthesis
The paper presents a discussion and a specification of an exception handling system dedicated to object-oriented programming. We show how a full object-oriented representation of exceptions and of protocols to handle them, using meta-classes, makes the system powerful as well as extendible and solves many classical exception handling issues. We explain the interest for object-oriented programming of handlers attached to classes and to expressions. We propose an original algorithm for propagating exceptions along the invocation chain which takes into account, at each stack level, both kind of handlers. Any class can control which exceptions will be propagated out of its methods; any method can provide context-dependant answers to exceptional events. The whole specification and some keys of our Smalltalk implementation are presented in the paper.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Specification and implementation of Actors with graph rewriting A solution to the explicit/implicit control dilemma Propagators and concurrent constraints Recent progress in combining actor-based concurrency with object-oriented programming CORAL: a concurrent object-oriented system for constructing and executing sequential, parallel and distributed applications
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1