MTK exception log
Preface: This article aims to have a general understanding of abnormal logs. The abnormal log has a lot of information, but for different exceptions, the log to be viewed is different. When I first came into contact with the MTK platform, I also made the following mistake: What should I do if there a
Exception and error difference error and Exception
Learn the difference between the exception and the error, and know what to do when you intercept an exception.
by Josh Street
Many programmers do not realize that there is a difference between an error and an exception,
Original address: http://yangshen998.iteye.com/blog/1311682
[HTML] view plain copy public class Exceptiontypetest {public void dosomething () throws arithmeticexception{ System.out.println (); public static void Main () {exceptiontypetest ett = new Exceptiontypetest (); Ett.dosomething (); } }
Question 1: Can the above program be compiled through. and explain why.
Answer: can compile pass. Analysis: According to General sense, the definition DoSomething method defines the arithmeticexception
exportWhen configured, the table Tbname on DB2M (Master)---> db2s (Slave) is not fully synchronized, and there is always a problem with data loss2. AnalysisA, db1m (Master)---> db1s (Slave) Table Tbname no exception, excluding db1s as the possibility of the problem of DB2M masterB, Db1s (tbname)---> db2m (tbname) Table Tbname No exception, exclude related configuration enabled on Db1s, etc.B, db2m (Master)
occurs uncaught exception, there is the class to take over the program, and record send error report. * * @author User * */public class Crashhandler implements Uncaughtexceptionhandler {public static final String TAG = "Crashhandler";Crashhandler instance private static Crashhandler INSTANCE = new Crashhandler ();The context object of the program is private context Mcontext;The system default Uncaughtexception processing class private Thread.uncaught
1. Multi-use Try,catch; do not have a try,catch contain all content Benefits: Different modules grab different exceptions, a module abnormal hanging, do not affect the other modules of the program 2. Write a few more catche; try not to use exception as a big exception to accommodate all exceptions. Do not want to pursue the concise code, Try,catch only write one, use ex
1. Multi-use Try,catch; do not have a try,catch containing all content
Benefits: Different modules grab different exceptions, a certain module is hanging, do not affect the program of other modules
2. Write a few more catche; try not to use exception this big exception to accommodate all the anomalies
Not in order to pursue the simplicity of the code, Try,catch only write one, use
New Logback.xml under 1.src/resources path
Console color Log Printing
Info log and Exception log separate file storage
Automatically generate logs daily
Combined with Myibatis for convenient log printing (debug mode)
2. Define a
MySQL slave database option log-slave-updates not enabled exception
Recently, it was verified that a specific table was copied from the slave database to another master database for adjustment. If log-slave-updates is not configured, the table cannot be synchronized normally. The replicate-rewrite-db parameter and the replicate_wild_do_table parameter are used in
Proactive Java (Exception Handling) and proactive Exception Handling
. Use exceptions only for exceptions:
I don't know if you have met the following code:
Copy codeThe Code is as follows:Try {Int I = 0; 3While (true)Range [I ++]. climb ();}Catch (ArrayIndexOutOfBoundsException e ){}The intention of this Code is not obvious. The intention is to traverse every ele
Java exception handling experience and exception handling experience
There are always various problems in the program. To enable normal operation during program execution, use the exception handling mechanism provided by Java to capture Possible exceptions, handle exceptions
After using Simplemappingexceptionresolver for uniform exception handling (refer to Spring MVC's exception-unification approach), when an exception is found, log4j cannot output the error log at the console. Therefore, you need to customize a Rrtongmappingexceptionresolver class that inherits to Simplemappingexceptionr
1: Describe the simple principle and application of the exception handling mechanism in Java, and describe the difference between error and exception?
If noProgramIf an exception is generated, the JVM will throw an instantiated object of the exception class, if the try sta
It is normal for an exception to occur in the program we wrote, but if an exception is not handled, It is abnormal. The Code of many programs is as follows:
Try{// A large part of code}Catch{// This field is null.}
I can say responsibly that this approach is very irresponsible!
Although users cannot see any errors during browsing, they do not know what happened, the correct handling method should be to repo
Reprint Address: http://zheyiw.iteye.com/blog/1670990Personal Note: general application1, collect all avtivity to completely exit the application2, catch the crash exception, save the error log, and restart the app Public classHkbaseapplicationextendsApplication {//Activity object list for unified management of activity PrivateListactivitylist; //Exception Cap
Spring AOP can not destroy our program code under the premise of a good program to print the exception, there are many such examples on the Web, I write here is relatively simple, just for the program to see the exception of the log printing, the code is relatively simple.Exception Log Processing classPackage Com.apt.s
./Startup. Sh
Using catalina_base:/software/Apache-Tomcat-6.0.18Using catalina_home:/software/Apache-Tomcat-6.0.18Using catalina_tmpdir:/software/Apache-Tomcat-6.0.18/tempUsing jre_home:/usr
Run the following command:PS-Ef | grep Tomcat
Check that no Tomcat process exists.
View Tomcat log information. The following error occurs:Warning: Error instantiating 'org. Apache. Juli. classloaderlogmanager 'referenced by
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.