wendy / com.levibostian.wendy.db / PendingTaskError

PendingTaskError

class PendingTaskError

Use this class to save a PendingTask instance to a SQLite database. PendingTask is designed to be a developer facing object.

Wendy used to use PendingTask to save to a SQLite database directly but there were limitions to what I could and could not do with the class once I decided to use it as a SQLite model (example: I could not even make it abstract). So, I decided to create another class to convert a PendingTask to and save that data to a SQLite database.

Constructors

<init>

PendingTaskError(id: Long, taskId: Long, createdAt: Long, errorMessage: String?, errorId: String?)

Use this class to save a PendingTask instance to a SQLite database. PendingTask is designed to be a developer facing object.

Properties

createdAt

var createdAt: Long

The Date your error was recorded in the Wendy database.

errorId

var errorId: String?

The identifier you, the developer, use to determine what type of error was caused and how to fix it.

errorMessage

var errorMessage: String?

The human readable error message you may use to show to the end user describing the error.

pendingTask

lateinit var pendingTask: PendingTask

The PendingTask this error is associated with.

taskId

var taskId: Long

The PendingTask.taskId you want to record an error for.

Functions

toString

fun toString(): String

Gives you a String representation of PendingTaskError

Extension Functions

resolveError

fun PendingTaskError.resolveError(): Boolean

Extension to Wendy.resolveError easily from a PendingTaskError instance.