Fault-tolerant mechanism

Source: Internet
Author: User

Any program can be faulted, so any language has a mechanism for fault-tolerant processing. In C #, you use a try ... Catch...... Finally this structure. In addition there is a corresponding to the error in VB of a parent class exception.

Try, the meaning of trying, put in the program to deal with some possible errors.

Catch, a catch, an error that is caught in a program with this process.

Finally, the final finishing process, regardless of the procedure is not wrong, we should have some resources to clean up, this is finally the role. As for whether you believe it or not, I believe it anyway.

Again, exception this parent class. Since it is a parent class, there must be some subclasses, for different types of errors must have different subclasses, different classes have different types of attribute descriptions and different processing methods. The development of the program, only through the system itself provides fault tolerance, certainly can not meet a variety of unpredictable to error, therefore, developers can also by throwing exceptions from the error description and processing methods.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.