首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 63 毫秒
1.
该文介绍了Java异常产生的原因,并介绍异常处理方法,对比了必检异常和免检时异常的差异,阐述了在Java应用程序中异常处理的方法。  相似文献   

2.
异常处理机制能增强程序运行的可靠性,提高软件的健壮性,但异常处理代码本身可能存在错误.由于它的特殊性。采用与测试普通代码同样的方法对其进行测试,通常效率不高而且很难达到预期的效果.在分析了利用断言违背策略进行软件故障注入技术的基础上,提出了将Java异常处理机制的特殊结构同断言违背策略、程序变异技术相结合,可以有效地测试异常处理代码。并设计工具来支持这种故障注入方法.  相似文献   

3.
Java异常处理机制的研究   总被引:7,自引:0,他引:7  
杨厚群  陈静 《计算机科学》2007,34(3):286-289
异常处理是Java语言的重要语言机制,正确、合理地处理异常对程序的可靠性、健壮性是十分重要的。在分析了异常处理技术的概念和思想后,对异常处理提出了指导原则,并针对检查型异常和非检查型异常的差异,探讨了对应的解决措施。  相似文献   

4.
异常处理机制是Java语言的一大特色。从异常处理的机制、异常处理的方法、异常处理的原则等方面介绍Java语言的异常处理技术,分析了抛出异常和捕获异常的实际应用及注意事项,以便更好地利用异常处理机制解决实际问题。  相似文献   

5.
Java是面向对象的程序语言,其异常处理机制是Java的一大特色。本文讨论了Java的异常处理机制,并指出异常处理机制中常见错误模式及注意事项,以便更好的利用Java解决实际问题。  相似文献   

6.
异常是用来处理程序错误的有效机制。本文通过对Java语言异常处理机制的分析,结合实例,对这一处理程序错误的有效方式和设计原则进行了探讨。  相似文献   

7.
在程序的开发过程中,异常处理是必然要考虑的问题,本文对C++和Java两种语言的异常处理机制作了分析和比较,以便我们正确使用异常处理机制,增强程序的安全性、健壮性.  相似文献   

8.
在程序设计中,程序中的错误主要包括编译性错误和运行性错误两种。其中编译错误主要是由于程序中存在语法错误,无法通过程序语言的编译系统而产生的错误,如Java语言语法规定关键字或者标识符要区分大小写,程序设计中如果不遵循该原则,编译时就会出错;而运行错误主要指程序在运行过程中产生的错误,这类错误可能是逻辑错误也可能是系统错误,如程序中出现死循环或者数组引用超范围等错误。  相似文献   

9.
基于多层架构的JavaWeb,由于采用分层的思想,在降低软件耦合性的同时,有效地增强了其内聚性,但在另一程度上却使得整个软件开发工作显得复杂,并容易出现运行错误。事实上,就目前的JavaWeb来说,其在运行出错时,都基本上是采用硬编码的方式加以应对,但却不可避免地增加了编码的难度,因此,进行相应的错误和异常处理架构模型的构建,显得尤为重要。本文将紧紧围绕着JavaWeb应用中错误异常处理方法这一中心主题,通过对其架构、处理原则、异常处理策略与实现进行分析和说明。  相似文献   

10.
异常处理是一种用来检测异常并时其进行处理的技术。异常处理机制已作为现代程序设计语言的一个重要的特性被广泛地采纳,以增强系统运行的可靠性,提高软件的健壮性。对异常处理在程序语言的实现进行了一般性研究,分析比较几种异常处理机制及其实现方法,提出了一种新的异常处理机制的实现方法。  相似文献   

11.
ContextFault handling represents a very important aspect of business process functioning. However, fault handling has thus far been solved statically, requiring the definition of fault handlers and handling logic to be defined at design time, which requires a great deal of effort, is error-prone and relatively difficult to maintain and extend. It is sometimes even impossible to define all fault handlers at design time.ObjectiveTo address this issue, we describe a novel context-aware architecture for fault handling in executable business process, which enables dynamic fault handling during business process execution.MethodWe performed analysis of existing fault handling disadvantages of WS-BPEL. We designed the artifact which complements existing statically defined fault handling in such a way that faults can be defined dynamically during business process run-time. We evaluated the artifact with analysis of system performance and performed a comparison against a set of well known workflow exception handling patterns.ResultsWe designed an artifact, that comprises an Observer component, Exception Handler Bus, Exception Knowledge Base and Solution Repository. A system performance analysis shows a significantly decreased repair time with the use of context aware activities. We proved that the designed artifact extends the range of supported workflow exception handling patterns.ConclusionThe artifact presented in this research considerably improves static fault handling, as it enables the dynamic fault resolution of semantically similar faults with continuous enhancement of fault handling in run-time. It also results in broader support of workflow exception handling patterns.  相似文献   

12.
Java虚拟机中异常机制实时性的研究及实现   总被引:1,自引:0,他引:1       下载免费PDF全文
异常处理机制是程序设计语言的重要特征之一。讨论了对Java异常处理进行实时性改造的可行性和具体方法,并且在Linux平台上,实现了对开源Java虚拟机SableVM中异常处理机制的实时性改造。实验结果表明改进后的虚拟机在异常捕获时间趋于线性的同时,异常表查询效率也得到了提高。  相似文献   

13.
从异常处理的分析方法和测试技术两个方面概述当前对异常处理的研究现状,分析和比较了一些典型方法;简要介绍了在C 程序中异常测试技术改进和工具实现方面所做的工作;探讨了异常分析和测试的若干研究方向.  相似文献   

14.
Java语言的异常处理设计原则   总被引:4,自引:0,他引:4  
异常处理是Java语言的重要语言机制,正确地处理异常对程序的可靠性、健壮性是十分重要的。回顾了异常处理技术的概念和思想,对异常处理提出了一套实用的设计原则,并针对Java语言的具体环境,分类介绍了各种异常的常用处理方式。  相似文献   

15.
从异常处理的分析方法和测试技术两个方面概述当前对异常处理的研究现状,分析和比较了一些典型方法;简要介绍了在C++程序中异常测试技术改进和工具实现方面所做的工作;探讨了异常分析和测试的若干研究方向。  相似文献   

16.
This paper presents an in‐depth study of the adequacy of the AspectJ language for modularizing and reusing exception‐handling code. The study consisted of refactoring existing applications so that the code responsible for implementing error‐handling strategies was moved to newly created exception handler aspects. We have performed quantitative assessments of five systems—four object‐oriented and one aspect‐oriented—based on four key quality attributes, namely separation of concerns, coupling, cohesion, and conciseness. Our investigation also included a multi‐perspective analysis of the refactored systems, including (i) the extent to which error‐handling aspects can be reused, (ii) the beneficial and harmful aspectization scenarios for exception handling, and (iii) the scalability of AOP to support the modularization of exception handling in the presence of other aspects. Copyright © 2009 John Wiley & Sons, Ltd.  相似文献   

17.
Scientific workflow systems often operate in highly unreliable, heterogeneous and dynamic environments, and have accordingly incorporated different fault tolerance techniques. We propose an exception‐handling mechanism, based on techniques adopted in programming languages, for modifying at run‐time the structure of a workflow. In contrast to other proposals that achieve the required flexibility by means of the infrastructure, our proposal expresses the exception‐handling mechanism within the workflow language—primarily as two exception‐handling patterns that are exclusively based on the Reference Nets‐within‐Nets formalism (a specific type of Petri nets). When an exception is detected, a workflow in our approach can be re‐written (replaced), based on the particular failure condition that has been detected. This enables workflow users to have better control and understanding of the behaviour of their workflow without having to be aware of the underlying infrastructure. Copyright © 2009 John Wiley & Sons, Ltd.  相似文献   

18.
Java uses exceptions to provide elegant error handling capabilities during program execution. However, the presence of exception handlers complicates the job of the just‐in‐time (JIT) compiler, while exceptions are rarely used in most programs. This paper describes two techniques for reducing such complications. First, we delay the translation of an exception handler until the exception really occurs. This on‐demand translation of exception handlers allows more optimizations when translating the main flow, without being hindered by constraints caused by the exception flows. Secondly, for those exceptions that are actually thrown during program execution we insert exception‐type check code and a direct branch to the translated exception handlers. This exception handler prediction is motivated by an observation that frequently thrown exceptions are likely to be handled by the same exception handlers, so this will eliminate the exception processing overhead of the Java virtual machine. Our experiments indicate that the code quality of the main flow is no longer affected by the presence of exception handlers. Also, frequently thrown exceptions can be efficiently handled by the exception handler prediction. Copyright © 2004 John Wiley & Sons, Ltd.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号