public class CPUException
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_ERROR |
Error reading from CPU files.
|
static long |
serialVersionUID |
|
static int |
SETTING_FILE_NOT_FOUND |
Setting file could not be found.
|
static int |
UNSPECIFIED_EXCEPTION |
Any exception that does not specify a specific issue.
|
static int |
WRITING_ERROR |
Error writing to CPU files.
|
Constructor | Description |
---|---|
CPUException() |
Constructs a generic
CPUException . |
CPUException(int exceptionType) |
Constructs a
CPUException with the given cause. |
CPUException(int exceptionType,
java.lang.String message) |
Constructs a
CPUException for the given exception cause and
detailed exception message. |
CPUException(int exceptionType,
java.lang.String message,
java.lang.Throwable throwable) |
Constructs a
CPUException for the given exception cause,
detailed message and parent exception. |
CPUException(int exceptionType,
java.lang.Throwable throwable) |
Constructs a
CPUException for the given exception cause and
parent exception. |
Modifier and Type | Method | Description |
---|---|---|
int |
getType() |
Retrieves the exception type.
|
public static final long serialVersionUID
public static final int UNSPECIFIED_EXCEPTION
public static final int SETTING_FILE_NOT_FOUND
public static final int READING_ERROR
public static final int WRITING_ERROR
protected int exceptionType
protected int channelIndex
public CPUException()
CPUException
.public CPUException(int exceptionType)
CPUException
with the given cause.exceptionType
- Type of exception.READING_ERROR
,
SETTING_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_ERROR
public CPUException(int exceptionType, java.lang.String message)
CPUException
for the given exception cause and
detailed exception message.exceptionType
- Type of exception.message
- Additional message for the exception.READING_ERROR
,
SETTING_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_ERROR
public CPUException(int exceptionType, java.lang.Throwable throwable)
CPUException
for the given exception cause and
parent exception.exceptionType
- Type of exception.throwable
- Parent exception.READING_ERROR
,
SETTING_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_ERROR
public CPUException(int exceptionType, java.lang.String message, java.lang.Throwable throwable)
CPUException
for the given exception cause,
detailed message and parent exception.exceptionType
- Type of exception.message
- Additional message for the exception.throwable
- Parent exception.READING_ERROR
,
SETTING_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_ERROR
public int getType()
UNSPECIFIED_EXCEPTION
if not explicitly set.READING_ERROR
,
SETTING_FILE_NOT_FOUND
,
UNSPECIFIED_EXCEPTION
,
WRITING_ERROR