眷顾是什么意思| 脚心发凉是什么原因| 检查全身挂什么科| 尿毒症有些什么症状| 七月六号是什么日子| 三月初什么星座| 摩羯座什么时候| 9月13号是什么星座| 导语是什么意思| 牛跟什么相冲| 深水炸弹是什么| 胎儿生物物理评分8分什么意思| 盆腔炎用什么药效果好| 宿便什么意思| 心什么如什么的成语| 湿气重有什么表现症状| 什么样的山峰| 心悸吃什么药| 小朋友眼袋很重是什么原因| 甲钴胺是治什么病的| 空腹喝可乐有什么危害| 清华大学校长什么级别| 益生菌什么时间吃最好| 天上火是什么意思| 喝中药不能吃什么| 乳头胀痛什么原因| 苹果是什么| 总警司相当于大陆什么官| 左眼跳是什么原因| 晚上吃黄瓜有什么好处| 什么是太监| 子加一笔是什么字| 相识是什么意思| 泛化是什么意思| 喝什么茶养肝护肝排毒| 月经期间同房有什么危害| 尿道感染要吃什么药| 熊人是什么意思| 输血浆主要起什么作用| 发达国家的标准是什么| 不小心怀孕了吃什么药可以流掉| 情系是什么意思| 什么是hpv| 什么叫精神出轨| 咳嗽白痰吃什么药| 什么花什么门的成语| 5月12号是什么日子| 荞麦和苦荞有什么区别| 血栓吃什么药最好| 肾最怕什么食物| 地衣是什么| 猫起什么名字好| 维生素b2吃多了有什么副作用| 左眼皮一直跳是什么预兆| 生命线分叉是什么意思| 离经之血是什么意思| 上当是什么意思| 氯雷他定片是什么药| 蓝绿色是什么颜色| 肠胃消化不好吃什么药| 百无一用是什么意思| 白领是什么意思| 12生肖为什么没有猫| 什么叫修辞手法| 做腹腔镜手术后需要注意什么| 第一次见女方家长带什么礼物好| 渣渣辉什么意思| 城市户口和农村户口有什么区别| 四不伤害是指什么| 心心相惜是什么意思| 早退是什么意思| 肾小球是什么| 吃什么| pct是什么意思| 什么叫通勤| 补血吃什么药| omega是什么意思| 医院三甲是什么意思| 腿痛挂什么科| 有什么组词| 清远有什么好玩的| 中暑是什么症状表现| 属龙五行属什么| 日本艺伎是干什么的| 皈依是什么意思| 硬不起吃什么药| 左旋肉碱什么时候吃效果好| 梦见水里有蛇是什么意思| 咏柳的咏是什么意思| 龟苓膏的原料是什么| 金花是什么意思| 吃万艾可有什么副作用| 为什么结婚| 七一年属什么生肖| 长沙为什么叫星城| karcher是什么牌子| 河粉是什么| 庚日是什么意思| 医保定点医院是什么意思| 吃了西瓜不能吃什么| 拉稀肚子疼吃什么药| 才貌双全是什么生肖| 侍中是什么官| 口腔疱疹用什么药| 肾宝片有什么副作用吗| 胎盘中药叫什么| lka是什么意思| 耳朵前面有痣代表什么| 来姨妈为什么是黑色的血| 罗曼蒂克什么意思| 放养是什么意思| 小王子讲了什么故事| 用纸盒能做什么手工| 刺身是什么意思| 藏医最擅长治什么病| 男人脚肿是什么病的前兆| 金翅鸟吃什么| 避孕药有什么副作用| 腹部增强ct能检查出什么| 什么情况会胎停| 突然视力模糊是什么原因引起的| 什么动物最怕水| 霞字五行属什么| 装藏是什么意思| c类火灾是指什么| 荷叶搭配什么一起喝减肥效果好| 74岁属什么生肖| 十月十五号是什么星座| 211是什么| 大天真香是什么意思| 阴毛变白是什么原因| 真丝姆米是什么意思| 比卡丘什么意思| 梦见冬瓜是什么意思| 打封闭是什么意思| 16周检查什么项目| 哈尔滨有什么特产| 体力不支是什么意思| lv什么牌子| 老年人贫血吃什么补血最快最有效| 子宫内膜14mm说明什么| 什么是追溯码| 消化性溃疡吃什么药好| 1991年属羊是什么命| 刷脂是什么意思| 台湾以前叫什么名字| 荭是什么意思| 白细胞低有什么危险| 身体有湿气有什么症状| 1月9日什么星座| 如泰山前面一个字是什么啊| 什么是uv| 纯净水是什么水| 甲状腺囊实性结节是什么意思| 焦油是什么| 鸡精和味精有什么区别| 慢性荨麻疹吃什么药| 前列腺吃什么药好| 宫颈钙化灶是什么意思| 自助餐是什么意思| 什么都不怕| 什么非常什么写句子| 彩虹为什么有七种颜色| 88属什么生肖| 放量十字星是什么意思| 蜘蛛最怕什么| 98什么意思| 低血压低是什么原因| 发明什么| 试管是什么| 彩超能检查出什么| 小腿浮肿吃什么药| 8月出生的是什么星座| 心脏属于什么系统| 孑然一身是什么意思| 公历年份是什么意思| 新生儿脸上有小红点带白头是什么| 缅甸的首都叫什么名字| 给老人过生日送什么礼物好| 七月什么星座| 麦粒肿吃什么药| 炖乌鸡汤放什么配料| 弱的部首是什么| 1995属什么生肖| 舌头发红是什么原因| 经常手麻是什么原因| 什么药可以降肌酐| 舌头根发麻是什么原因| 12月10号是什么星座| 尿肌酐高是什么原因| 摩拳擦掌是什么生肖| 粥米是什么米| 浓鼻涕吃什么药| 为什么说尽量不戴脚链| 感冒挂号挂什么科| 被艹是什么感觉| 球鞋ep是什么意思| 荷花什么时候开| 四点水的字与什么有关| 左卡尼汀口服溶液主要治疗什么| 石榴代表什么生肖| 青云志3什么时候上映| 妈妈是什么| 塞肛门的止痛药叫什么| 远香近臭什么意思| 情人节送妈妈什么花| 什么能力| 旌旗是什么意思| 没什么打什么| 左边脖子疼是什么原因| 什么是hpv感染| 脑梗吃什么食物| 幽门螺杆菌阳性什么意思| 什么样的春光| 阴道炎用什么栓剂| 4月16什么星座| 失眠是什么原因引起的| 宫颈机能不全是什么原因造成的| 膂力是什么意思| 甲亢甲减有什么症状| 孕妇用什么牙膏比较好| 什么是对偶句| 什么是三位一体| 女性阴毛变白是什么原因| 诬赖是什么意思| 加盟什么店最赚钱投资小| 什么是暗物质| 一直打嗝是什么问题| 靓女是什么意思| 哺乳期可以喝什么饮料| 等闲识得东风面什么意思| 吃什么润肺| 蚊子怕什么气味| 八败是什么意思| 学业有成是什么意思| 绿色洋桔梗花语是什么| 阳痿早泄吃什么药| 佐餐是什么意思| 罗汉是什么意思| 人为什么会做春梦| 什么是苔藓皮肤病| 性病有什么症状| 为什么同房后会出血| 三分钟热度是什么意思| 深圳居住证有什么用| 牛油果核有什么用| 吃坏东西拉肚子吃什么药| 梦见女鬼是什么意思| 什么花代表永恒的爱| 7月14什么星座| 女人阴虚是什么意思| 皮肤过敏吃什么药| 子宫粘连有什么症状| 什么样的情况下会怀孕| 粪便隐血试验弱阳性是什么意思| 月亮什么时候是圆的| 红细胞偏高是什么原因| 甲醛超标有什么危害| 什么叫因果| 荷字五行属什么| 其可以组什么词| 蓝莓是什么味道| hpv吃什么提高免疫力| 心悸吃什么药好| 百度Jump to content

规划计划

From Wikipedia, the free encyclopedia
百度 为了实现全球顶尖汽车的目标,绿驰汽车着力构建研发机构全球化、产业链与合作伙伴全球化、市场与服务全球化的创新平台,已在上海、北京、意大利都灵等地设立创新研发中心,与国际大批顶尖新能源汽车配套企业形成战略合作关系,在动力总成、车身轻量化、自动驾驶、智能车联四个方向实现了重大技术动突破,其中多项核心技术在同领域达到世界先进水平。

In computing and computer programming, exception handling is the process of responding to the occurrence of exceptions – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an exception breaks the normal flow of execution and executes a pre-registered exception handler; the details of how this is done depend on whether it is a hardware or software exception and how the software exception is implemented.

Exceptions are defined by different layers of a computer system, and the typical layers are CPU-defined interrupts, operating system (OS)-defined signals, programming language-defined exceptions. Each layer requires different ways of exception handling although they may be interrelated, e.g. a CPU interrupt could be turned into an OS signal. Some exceptions, especially hardware ones, may be handled so gracefully that execution can resume where it was interrupted.

Definition

[edit]

The definition of an exception is based on the observation that each procedure has a precondition, a set of circumstances for which it will terminate "normally".[1] An exception handling mechanism allows the procedure to raise an exception[2] if this precondition is violated,[1] for example if the procedure has been called on an abnormal set of arguments. The exception handling mechanism then handles the exception.[3]

The precondition, and the definition of exception, is subjective. The set of "normal" circumstances is defined entirely by the programmer, e.g. the programmer may deem division by zero to be undefined, hence an exception, or devise some behavior such as returning zero or a special "ZERO DIVIDE" value (circumventing the need for exceptions).[4] Common exceptions include an invalid argument (e.g. value is outside of the domain of a function),[5] an unavailable resource (like a missing file,[6] a network drive error,[7] or out-of-memory errors[8]), or that the routine has detected a normal condition that requires special handling, e.g., attention, end of file.[9] Social pressure is a major influence on the scope of exceptions and use of exception-handling mechanisms, i.e. "examples of use, typically found in core libraries, and code examples in technical books, magazine articles, and online discussion forums, and in an organization’s code standards".[10]

Exception handling solves the semipredicate problem, in that the mechanism distinguishes normal return values from erroneous ones. In languages without built-in exception handling such as C, routines would need to signal the error in some other way, such as the common return code and errno pattern.[11] Taking a broad view, errors can be considered to be a proper subset of exceptions,[12] and explicit error mechanisms such as errno can be considered (verbose) forms of exception handling.[11] The term "exception" is preferred to "error" because it does not imply that anything is wrong - a condition viewed as an error by one procedure or programmer may not be viewed that way by another.[13]

The term "exception" may be misleading because its connotation of "anomaly" indicates that raising an exception is abnormal or unusual,[14] when in fact raising the exception may be a normal and usual situation in the program.[13] For example, suppose a lookup function for an associative array throws an exception if the key has no value associated. Depending on context, this "key absent" exception may occur much more often than a successful lookup.[15]

History

[edit]

The first hardware exception handling was found in the UNIVAC I from 1951. Arithmetic overflow executed two instructions at address 0 which could transfer control or fix up the result.[16] Software exception handling developed in the 1960s and 1970s. Exception handling was subsequently widely adopted by many programming languages from the 1980s onward.

Hardware exceptions

[edit]

There is no clear consensus as to the exact meaning of an exception with respect to hardware.[17] From the implementation point of view, it is handled identically to an interrupt: the processor halts execution of the current program, looks up the interrupt handler in the interrupt vector table for that exception or interrupt condition, saves state, and switches control.

IEEE 754 floating-point exceptions

[edit]

Exception handling in the IEEE 754 floating-point standard refers in general to exceptional conditions and defines an exception as "an event that occurs when an operation on some particular operands has no outcome suitable for every reasonable application. That operation might signal one or more exceptions by invoking the default or, if explicitly requested, a language-defined alternate handling."

By default, an IEEE 754 exception is resumable and is handled by substituting a predefined value for different exceptions, e.g. infinity for a divide by zero exception, and providing status flags for later checking of whether the exception occurred (see C99 programming language for a typical example of handling of IEEE 754 exceptions). An exception-handling style enabled by the use of status flags involves: first computing an expression using a fast, direct implementation; checking whether it failed by testing status flags; and then, if necessary, calling a slower, more numerically robust, implementation.[18]

The IEEE 754 standard uses the term "trapping" to refer to the calling of a user-supplied exception-handling routine on exceptional conditions, and is an optional feature of the standard. The standard recommends several usage scenarios for this, including the implementation of non-default pre-substitution of a value followed by resumption, to concisely handle removable singularities.[18][19][20]

The default IEEE 754 exception handling behaviour of resumption following pre-substitution of a default value avoids the risks inherent in changing flow of program control on numerical exceptions. For example, the 1996 Cluster spacecraft launch ended in a catastrophic explosion due in part to the Ada exception handling policy of aborting computation on arithmetic error. William Kahan claims the default IEEE 754 exception handling behavior would have prevented this.[19]

In programming languages

[edit]
In computer programming, several language mechanisms exist for exception handling. The term exception is typically used to denote a data structure storing information about an exceptional condition. One mechanism to transfer control, or raise an exception, is known as a throw; the exception is said to be thrown. Execution is transferred to a catch.

In user interfaces

[edit]

Front-end web development frameworks, such as React and Vue, have introduced error handling mechanisms where errors propagate up the user interface (UI) component hierarchy, in a way that is analogous to how errors propagate up the call stack in executing code.[21][22] Here the error boundary mechanism serves as an analogue to the typical try-catch mechanism. Thus a component can ensure that errors from its child components are caught and handled, and not propagated up to parent components.

For example, in Vue.js, a component would catch errors by implementing errorCaptured

Vue.component('parent', {
    template: '<div><slot></slot></div>',
    errorCaptured: (err, vm, info) => alert('An error occurred');
})
Vue.component('child', {
    template: '<div>{{ cause_error() }}</div>'
})

When used like this in markup:

<parent>
    <child></child>
</parent>

The error produced by the child component is caught and handled by the parent component.[23]

See also

[edit]

References

[edit]
  1. ^ a b Cristian, Flaviu (1980). "Exception Handling and Software Fault Tolerance". IEEE Transactions on Computers (6) (FTCS-25 reprint ed.): 531–540. CiteSeerX 10.1.1.116.8736. doi:10.1109/TC.1982.1676035. OCLC 1029229019. S2CID 18345469.
  2. ^ Goodenough 1975b, pp. 683–684.
  3. ^ Goodenough 1975b, p. 684.
  4. ^ Black 1982, pp. 13–15.
  5. ^ Keeton, Cavaness & Friesen 2001: ArrayIndexOutOfBoundsException
  6. ^ Keeton, Cavaness & Friesen 2001: FileNotFoundException
  7. ^ "Unusual error message : java.io.SyncFailedException: sync failed". groups.google.com. Retrieved 17 November 2023.
  8. ^ "Understand the OutOfMemoryError Exception". docs.oracle.com. Retrieved 17 November 2023.
  9. ^ Java: FileNotFoundException
  10. ^ Kiniry, J. R. (2006). "Exceptions in Java and Eiffel: Two Extremes in Exception Design and Application". Advanced Topics in Exception Handling Techniques (PDF). Lecture Notes in Computer Science. Vol. 4119. pp. 288–300. doi:10.1007/11818502_16. ISBN 978-3-540-37443-5. S2CID 33283674.
  11. ^ a b Lang, Jun; Stewart, David B. (March 1998). "A study of the applicability of existing exception-handling techniques to component-based real-time software technology". ACM Transactions on Programming Languages and Systems. 20 (2): 276. CiteSeerX 10.1.1.33.3400. doi:10.1145/276393.276395. S2CID 18875882. Perhaps the most common form of exception-handling method used by software programmers is the "return-code" technique that was popularized as part of C and UNIX.
  12. ^ Levin 1977, p. 5.
  13. ^ a b Liskov, B.H.; Snyder, A. (November 1979). "Exception Handling in CLU" (PDF). IEEE Transactions on Software Engineering. SE-5 (6): 546–558. doi:10.1109/TSE.1979.230191. S2CID 15506879. Retrieved 19 December 2021.
  14. ^ "Thesaurus results for EXCEPTION". www.merriam-webster.com. Retrieved 17 November 2023.
  15. ^ Levin 1977, p. 4.
  16. ^ Smotherman, Mark. "Interrupts". Retrieved 4 January 2022.
  17. ^ Hyde, Randall. "Art of Assembly: Chapter Seventeen". www.plantation-productions.com. Retrieved 22 December 2021.
  18. ^ a b Xiaoye Li; James Demmel (1994). "Faster Numerical Algorithms via Exception Handling, IEEE Transactions on Computers, 43(8)": 983–992. {{cite journal}}: Cite journal requires |journal= (help)
  19. ^ a b W.Kahan (July 5, 2005). "A Demonstration of Presubstitution for ∞/∞" (PDF). Archived (PDF) from the original on March 10, 2012.
  20. ^ Hauser, John R. (March 1996). "Handling floating-point exceptions in numeric programs". ACM Transactions on Programming Languages and Systems. 18 (2): 139–174. doi:10.1145/227699.227701. S2CID 9820157.
  21. ^ "Error Boundaries". React. Retrieved 2025-08-06.
  22. ^ "Vue.js API". Vue.js. Retrieved 2025-08-06.
  23. ^ "Error handling with Vue.js". CatchJS. Retrieved 2025-08-06.
[edit]
什么叫韵母 栀子泡水喝有什么功效 什么是质子重离子治疗 梅菜是什么菜晒干的 一什么一
指甲发黄是什么原因 梦到自己老公出轨是什么意思 一天吃一个苹果有什么好处 榴莲什么样的好吃 经常说梦话是什么原因
减肥去医院挂什么科 信的拼音是什么 破日是什么意思 苹果什么时间吃最好 多梦吃什么药效果最好
什么是编外人员 脾胃不好能吃什么水果 maga是什么意思 属牛和什么属相相冲 看男科挂什么门诊
水痘挂什么科adwl56.com 温碧泉属于什么档次hcv8jop2ns6r.cn 甜蜜素是什么东西96micro.com 什么酒适合女生喝hcv8jop7ns0r.cn 紫癜有什么危害hcv8jop9ns0r.cn
龙马精神代表什么生肖hcv8jop1ns6r.cn 克罗心是什么档次hcv8jop0ns6r.cn 料酒和黄酒有什么区别hcv8jop5ns2r.cn 看耳朵挂什么科hcv8jop9ns3r.cn 蟑螂喜欢什么样的环境hcv8jop8ns3r.cn
sheen是什么牌子的手表hcv9jop2ns2r.cn 金银花什么时候开花hcv8jop0ns5r.cn 大忌什么意思hcv9jop1ns4r.cn viscose是什么面料hcv9jop6ns6r.cn 芒果是什么季节的hcv8jop0ns3r.cn
825是什么意思hcv8jop6ns8r.cn 双向情感障碍是什么意思hcv8jop7ns1r.cn 中国国酒是什么hcv8jop3ns4r.cn 天朝是什么意思hcv9jop3ns7r.cn 细菌性前列腺炎吃什么药hcv7jop5ns6r.cn
百度