Code specification for high-efficiency Code error-Tuning Series-let software learn to find flaws

Source: Internet
Author: User

Preface using assertion exception and log processing

Preface

Make sure your error message can help you debug errors, not just to remind you that you need debugging errors. using Assertions

Each block of code is built on a myriad of hypothetical platforms-some of which must be correct in order for the results to match expectations. Often the flaw arises because some assumptions are not tenable or are wrong. It is not possible and meaningless to avoid making these assumptions, but we can not only validate them, but also validate them automatically through assertions.

So what is assertion, how to use assertions better, and how it can help us to automatically verify flaws. See the series blog "Assertions in Java" exception and log processing for details

In the previous blog post, we mentioned Ali's Java Development Programming protocol, which mentions the use of exceptions and the specification of log processing.

The Exception Log is a set of combinations that allow us to detect errors this morning and preempt system problems before they occur, rather than waiting for them to emerge at the end of the production phase. To be able to use abnormal and log processing correctly and efficiently, we must first understand the anomaly system and the log system, for their basic concepts and the corresponding framework system to understand to be more efficient use, in the following blog will be two series of blog "Java Anomaly system", "Java in the log system", I will not dwell on it here.

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.