HeapAnalysisException.kt
TLDR
This file contains the definition of the HeapAnalysisException
class which is a custom exception used in the Shark library.
Classes
HeapAnalysisException
The HeapAnalysisException
class is a custom exception class that extends the RuntimeException
class. It is used in the Shark library to represent exceptions that occur during heap analysis.
The class has the following properties and methods:
-
Properties
-
serialVersionUID
- a private constant that represents the unique identifier for serialization purposes.
-
-
Methods
-
toString()
: Overrides thetoString()
method of theRuntimeException
class. It converts the exception stack trace to a string representation and returns it.
-
package shark
import java.io.PrintWriter
import java.io.StringWriter
class HeapAnalysisException(cause: Throwable) : RuntimeException(cause) {
override fun toString(): String {
val stringWriter = StringWriter()
cause!!.printStackTrace(PrintWriter(stringWriter))
return stringWriter.toString()
}
companion object {
private const val serialVersionUID: Long = -2522323377375290608
}
}