Package xcrash

Interface ICrashCallback


  • public interface ICrashCallback
    Define the callback interface after the crash occurs.

    Note: Strictly speaking, this interface should always be implemented. When disk is exhausted, the crash information cannot be saved to a crash log file. The only way you can get the crash information is through the second parameter of onCrash() method. Then you should parse and post the information immediately, because the APP process is crashing, it will be killed by the system at any time.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onCrash​(java.lang.String logPath, java.lang.String emergency)
      When a Java exception or native crash occurs, xCrash first captures and logs the crash information to a crash log file and then calls this method.
    • Method Detail

      • onCrash

        void onCrash​(java.lang.String logPath,
                     java.lang.String emergency)
              throws java.lang.Exception
        When a Java exception or native crash occurs, xCrash first captures and logs the crash information to a crash log file and then calls this method.
        Parameters:
        logPath - Absolute path to the crash log file.
        emergency - A buffer that holds basic crash information when disk exhausted.
        Throws:
        java.lang.Exception - xCrash will catch and ignore any exception throw by this method.