Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Exception handling method and device and software system

A technology of exception handling and processing methods, applied in the field of computer software systems, can solve the problems of scattered exception handling codes, low reusability, complex processing, etc., to reduce workload and error opportunities, high reusability, and streamline programs The effect of the code

Inactive Publication Date: 2012-03-21
KINGDEE SOFTWARE(CHINA) CO LTD
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the embodiments of the present invention is to provide a simple and convenient exception handling method, aiming to solve the problems of scattered and cumbersome exception handling codes, complex processing and low reusability

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Exception handling method and device and software system
  • Exception handling method and device and software system
  • Exception handling method and device and software system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0033] figure 1 The implementation flow of the exception handling provided by the first embodiment of the present invention is shown, and the details are as follows:

[0034] In the embodiment of the present invention, it is first necessary to explain the exception handling interface class throughout the embodiment of the present invention. One is the exception handling interface Handler customized by programmers according to the type of exception they need to solve. The other is the default exception handling interface DefaultHandler (such as figure 2 shown).

[0035] In step S101, the exception is marked, and the exception handling interface required to handle the exception is marked.

[0036] In the embodiment of the present invention, the exception label refers to the exception handling interface Handler or the default exception handling interface DefaultHandler marked with Java's own labeling function through the exception labeling class ExceptionHandler.

[0037] Th...

Embodiment 2

[0066] image 3 The implementation flow of the exception handling provided by the second embodiment of the present invention is shown, and the details are as follows:

[0067] In step S301, the exception is marked, and the exception handling interface required to handle the exception is marked;

[0068] In step S302, after the system throws an exception, it uniformly captures the exceptions marked with exceptions;

[0069] In step S303, it is judged whether there is a corresponding relationship between the exception and the exception handling interface, if yes, step S305 is directly executed, otherwise step S304 is executed first, and then step S305 is executed;

[0070] In step S304, find the corresponding exception handling interface according to the exception label and store the corresponding relationship between the exception and the exception handling interface;

[0071] In step S305, by reading the corresponding relationship between the exception and the exception hand...

Embodiment 3

[0076] Figure 4 The implementation flow of the exception handling provided by the third embodiment of the present invention is shown, and the details are as follows:

[0077] In step S401, the exception is marked, and the exception handling interface required to handle the exception is marked;

[0078] In step S402, after the system throws an exception, it uniformly captures the exceptions marked with exceptions;

[0079] In step S403, it is judged whether there is a corresponding relationship between the exception and the exception handling interface, if yes, step S305 is directly executed, otherwise step S304 is executed first, and then step S305 is executed;

[0080] In step S404, find the corresponding exception handling interface according to the exception label and store the corresponding relationship between the exception and the exception handling interface;

[0081] In step S405, by reading the corresponding relationship between the exception and the exception hand...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention belongs to the field of computer software systems, and provides an exception handling method, an exception handling device and a software system. The method comprises the following steps of: marking an exception and marking an exception handling interface corresponding to the exception; uniformly acquiring exception subjected to exception marking after the exception is thrown out by the system; finding the corresponding exception handling interface according to the exception marking and storing a corresponding relation between the exception and the exception handling interface; and calling the exception handling interface to handle the exception. With the adoption of the method for uniformly and concentratedly handling the exception, the workload of a programmer and the chance of error are greatly reduced, a program code is simplified, the product quality is improved, the problem of independently writing a handling code when the exception occurs every time by the programmer is solved, and same handling on the exception of the same type is realized; moreover, the code is high in reusability, and the exception can be handled in different environments.

Description

technical field [0001] The invention belongs to the field of computer software systems, and in particular relates to a method, device and software system for abnormal processing. Background technique [0002] Exceptions are errors that occur during program execution. The traditional exception handling method is mainly handled by programmers directly. This method contains multiple exception handling statements, resulting in bloated code; exception handling is scattered in the middle of each code file, and for the same type of exception, programmers need to write or copy in multiple codes, which is prone to inconsistent processing; Different types of errors have different representations, which complicates the processing; each layer in a project handles exceptions in different ways, and different layers write different codes, which will cause troublesome code usage and low reusability. If it needs to be modified, it may change a lot. Contents of the invention [0003] The...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/44
Inventor 曾功立
Owner KINGDEE SOFTWARE(CHINA) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products