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.