NAME
RapidApp::DbicExceptionStore;
ATTRIBUTES
- resultSource
-
The DBIC ResultSource matching the required schema (below)
DESCRIPTION
This module provides the ExceptionStore role which reads/writes rows to the exceptions table, and then serializes relevant bits of data into a blob field to be deserialized and inspected later.
The required schema is (subject to change):
- who
-
Stored in database column. The UserID from the user object in the catalyst object, as found in the RapidApp::Error object.
- what
-
Stored in database column. The summary text of the exception, limited to 64 characters, useful for quick identification in grid lists. This is the RapidApp::Error->message text.
- when
-
Stored in database column. The DateTime of when the exception occured. This columns should be configured to inflate and deflate from DateTime objects.
- where
-
The source location where the exception occured. This is extracted from the Error object and duplicated here for SQL searchability.
- why
-
Serialized into the blob. The exception object itself, which is a RapidApp::Error object.
In SQL DDL: CREATE TABLE error_report ( id int not null AUTO_INCREMENT, when DATETIME not null default NOW(), summary VARCHAR(200) not null, report MEDIUMBLOB not null, PRIMARY KEY (id) )
METHODS
$id= $store->saveException( $err )
Writes out a new record in the table, saving this exception object.