public class ErrorEvent extends SystemEvent
The class takes a Throwable
object parameter in one constructor, but the
Throwable object cannot be returned from this class due to implementation and security
issues. The Throwable object attributes (i.e., message and stacktrace) can be retrieved
from this class by calling corresponding get methods, which in-turn call the Throwable
object get methods. However, the implementation MUST NOT allow the Throwable object get
methods to block indefinitely when called and MUST NOT wait longer than 30 seconds for them
to return.
Modifier and Type | Field and Description |
---|---|
static int |
APP_CAT_GENERAL_ERROR
Application catastrophic error that doesn't fit into any other given category.
|
static int |
APP_INFO_GENERAL_EVENT
Application informational event that doesn't fit into any other given category.
|
static int |
APP_REC_GENERAL_ERROR
Application recoverable error that doesn't fit into any other given category.
|
static int |
APP_REC_JAVA_THROWABLE
Application recoverable error - a Java Throwable caught by an exception, but that can
be recovered from by the application, or a Throwable that was created by an
application due to detection of a recoverable event.
|
static int |
SYS_CAT_GENERAL_ERROR
System catastrophic error that doesn't fit into any other given category.
|
static int |
SYS_CAT_JAVA_THROWABLE
Java Throwable thrown by a call made by an application but not caught by the application.
|
static int |
SYS_INFO_GENERAL_EVENT
System informational event that doesn't fit into any other given category.
|
static int |
SYS_REC_GENERAL_ERROR
System error that doesn't fit into any other given category.
|
BEGIN_APP_CAT_ERROR_EVENT_TYPES, BEGIN_APP_CAT_ERROR_RESERVED_EVENT_TYPES, BEGIN_APP_INFO_EVENT_TYPES, BEGIN_APP_INFO_RESERVED_EVENT_TYPES, BEGIN_APP_REC_ERROR_EVENT_TYPES, BEGIN_APP_REC_ERROR_RESERVED_EVENT_TYPES, BEGIN_SYS_CABLECARD_RESET_EVENT_TYPES, BEGIN_SYS_CAT_ERROR_EVENT_TYPES, BEGIN_SYS_CAT_ERROR_RESERVED_EVENT_TYPES, BEGIN_SYS_DNLD_EVENT_TYPES, BEGIN_SYS_INFO_EVENT_TYPES, BEGIN_SYS_INFO_RESERVED_EVENT_TYPES, BEGIN_SYS_REBOOT_EVENT_TYPES, BEGIN_SYS_REBOOT_RESERVED_EVENT_TYPES, BEGIN_SYS_REC_ERROR_EVENT_TYPES, BEGIN_SYS_REC_ERROR_RESERVED_EVENT_TYPES, BEGIN_SYS_RES_DEP_EVENT_TYPES, BEGIN_SYS_RES_DEP_RESERVED_EVENT_TYPES, END_APP_CAT_ERROR_EVENT_TYPES, END_APP_INFO_EVENT_TYPES, END_APP_REC_ERROR_EVENT_TYPES, END_SYS_CABLECARD_RESET_EVENT_TYPES, END_SYS_CAT_ERROR_EVENT_TYPES, END_SYS_DNLD_EVENT_TYPES, END_SYS_INFO_EVENT_TYPES, END_SYS_REBOOT_EVENT_TYPES, END_SYS_REC_ERROR_EVENT_TYPES, END_SYS_RES_DEP_EVENT_TYPES
Constructor and Description |
---|
ErrorEvent(int typeCode,
String message)
Class constructor specifying the event type code and readable message.
|
ErrorEvent(int typeCode,
String message,
String stacktrace,
String[] throwableClasses,
long date,
AppID appId)
This constructor is provided for internal use by OCAP implementations;
applications SHOULD NOT call it.
|
ErrorEvent(int typeCode,
Throwable throwable)
Class constructor specifying the event type code, and throwable condition.
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Gets the readable message String that was passed to a constructor explicitly or within
a Throwable object.
|
String |
getStackTrace()
Gets the stack trace from the Throwable object if a Throwable object was passed to the
appropriate constructor.
|
String[] |
getThrowableClasses()
Gets the class hierarchy from the Throwable object that was passed to the corresponding
constructor.
|
getAppID, getDate, getTypeCode
public static final int APP_INFO_GENERAL_EVENT
public static final int APP_REC_GENERAL_ERROR
public static final int APP_REC_JAVA_THROWABLE
public static final int APP_CAT_GENERAL_ERROR
public static final int SYS_INFO_GENERAL_EVENT
public static final int SYS_REC_GENERAL_ERROR
public static final int SYS_CAT_GENERAL_ERROR
public static final int SYS_CAT_JAVA_THROWABLE
public ErrorEvent(int typeCode, String message)
typeCode
- - Unique error type code.message
- - Readable error message.IllegalArgumentException
- when called by an application and the typeCode
is not in one of the following ranges:
SystemEvent.BEGIN_APP_INFO_EVENT_TYPES
to SystemEvent.END_APP_INFO_EVENT_TYPES
, or
SystemEvent.BEGIN_APP_REC_ERROR_EVENT_TYPES
to SystemEvent.END_APP_REC_ERROR_EVENT_TYPES
, or
SystemEvent.BEGIN_APP_CAT_ERROR_EVENT_TYPES
to SystemEvent.END_APP_CAT_ERROR_EVENT_TYPES
.public ErrorEvent(int typeCode, Throwable throwable)
typeCode
- - The unique error type code.throwable
- - A throwable object that was generated by the implementation or
an application in response to an informational or error event, or by the
implementation when a call made by an application throws an exception that
isn't caught by the application.IllegalArgumentException
- when called by an application and the typeCode
is not in one of the following ranges:
SystemEvent.BEGIN_APP_INFO_EVENT_TYPES
to SystemEvent.END_APP_INFO_EVENT_TYPES
, or
SystemEvent.BEGIN_APP_REC_ERROR_EVENT_TYPES
to SystemEvent.END_APP_REC_ERROR_EVENT_TYPES
, or
SystemEvent.BEGIN_APP_CAT_ERROR_EVENT_TYPES
to SystemEvent.END_APP_CAT_ERROR_EVENT_TYPES
.public ErrorEvent(int typeCode, String message, String stacktrace, String[] throwableClasses, long date, AppID appId)
typeCode
- - The unique error type code.message
- - Readable message specific to the event generator.stacktrace
- - Stacktrace taken from a Throwable object or null if no Throwable
used.throwableClasses
- - The class hierarchy list from a Throwable object or null if
no Throwable used.date
- - Event date in milli-seconds from midnight January 1, 1970 GMT.appId
- - The Id of the application logging the event.SecurityException
- if this constructor is called by any application.public String getStackTrace()
public String getMessage()
getMessage
in class SystemEvent
public String[] getThrowableClasses()
Copyright © 2013 CableLabs. All rights reserved.