TorrentErrorAlert

data class TorrentErrorAlert(val torrentName: String?, val errorValue: Int = 0, val errorMessage: String? = null, val filename: String = "") : TorrentAlert

Posted whenever a torrent is transitioned into the error state. Ported from libtorrent::torrent_error_alert (alert_type 64).

libtorrent renders "<name> ERROR: (<value> <message>) <filename>" when an error code is set, or "<name> ERROR: <filename>" otherwise.

Constructors

Link copied to clipboard
constructor(torrentName: String?, errorValue: Int = 0, errorMessage: String? = null, filename: String = "")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val category: Int

The bitmask of AlertCategory flags this alert belongs to. Mirrors alert::category(), which returns the concrete alert's static_category.

Link copied to clipboard

the error description, or null/empty if unset.

Link copied to clipboard

the libtorrent error value (error.value()), or 0 if unset.

Link copied to clipboard

the file (or object) the error occurred on; may be empty.

Link copied to clipboard
open override val torrentName: String?

the torrent's name, or null when the handle would be invalid (rendered as " - ", matching libtorrent).

Link copied to clipboard
open override val type: Int

An integer unique to this alert type, matching the C++ alert_type static constant. It can be compared against a concrete alert's ALERT_TYPE to determine the runtime type. Mirrors alert::type().

Link copied to clipboard
open override val what: String

A short string literal naming the alert type (e.g. "torrent_finished"). It carries no bundled information. Mirrors alert::what(), which in libtorrent returns alert_name(alert_type).

Functions

Link copied to clipboard
open override fun message(): String

A string describing the alert and the information bundled with it. Intended for debugging/development, not localization. Mirrors alert::message().