public class CPUTemperatureException
extends java.lang.Exception
The exception stores information about the kind of problem that caused the exception.
Modifier and Type | Field | Description |
---|---|---|
protected int |
channelIndex |
|
protected int |
exceptionType |
|
static int |
READING_TEMP_FILE_ERROR |
Error reading from temperature file.
|
static long |
serialVersionUID |
|
static int |
TEMPERATURE_FILE_NOT_FOUND |
Temperature file could not be found.
|
static int |
UNSPECIFIED_EXCEPTION |
Any exception that does not specify a specific issue.
|
static int |
WRITING_TEMP_FILE_ERROR |
Error writing to temperature file.
|
Constructor | Description |
---|---|
CPUTemperatureException() |
Constructs a generic
CPUTemperatureException . |
CPUTemperatureException(int exceptionType) |
Constructs a
CPUTemperatureException with the given cause. |
CPUTemperatureException(int exceptionType,
java.lang.String message) |
Constructs a
CPUTemperatureException for the given exception
cause and detailed exception message. |
CPUTemperatureException(int exceptionType,
java.lang.String message,
java.lang.Throwable throwable) |
Constructs a
CPUTemperatureException for the given exception
cause, detailed message and parent exception. |
CPUTemperatureException(int exceptionType,
java.lang.Throwable throwable) |
Constructs a
CPUTemperatureException for the given exception
cause and parent exception. |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getMessage() |
|
int |
getType() |
Retrieves the exception type.
|
public static final long serialVersionUID
public static final int UNSPECIFIED_EXCEPTION
public static final int TEMPERATURE_FILE_NOT_FOUND
public static final int READING_TEMP_FILE_ERROR
public static final int WRITING_TEMP_FILE_ERROR
protected int exceptionType
protected int channelIndex
public CPUTemperatureException()
CPUTemperatureException
.public CPUTemperatureException(int exceptionType)
CPUTemperatureException
with the given cause.exceptionType
- Type of exception.READING_TEMP_FILE_ERROR
,
TEMPERATURE_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_TEMP_FILE_ERROR
public CPUTemperatureException(int exceptionType, java.lang.String message)
CPUTemperatureException
for the given exception
cause and detailed exception message.exceptionType
- Type of exception.message
- Additional message for the exception.READING_TEMP_FILE_ERROR
,
TEMPERATURE_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_TEMP_FILE_ERROR
public CPUTemperatureException(int exceptionType, java.lang.Throwable throwable)
CPUTemperatureException
for the given exception
cause and parent exception.exceptionType
- Type of exception.throwable
- Parent exception.READING_TEMP_FILE_ERROR
,
TEMPERATURE_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_TEMP_FILE_ERROR
public CPUTemperatureException(int exceptionType, java.lang.String message, java.lang.Throwable throwable)
CPUTemperatureException
for the given exception
cause, detailed message and parent exception.exceptionType
- Type of exception.message
- Additional message for the exception.throwable
- Parent exception.READING_TEMP_FILE_ERROR
,
TEMPERATURE_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_TEMP_FILE_ERROR
public int getType()
UNSPECIFIED_EXCEPTION
if not explicitly set.READING_TEMP_FILE_ERROR
,
TEMPERATURE_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_TEMP_FILE_ERROR
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable