LibtorrentError

libtorrent's primary error enumeration, ported from errors::error_code_enum (include/libtorrent/error_code.hpp) together with the human-readable strings from libtorrent_error_category::message() (src/error_code.cpp).

In libtorrent these codes live in the libtorrent_category() Boost.System error category. KiteTorrent has no Boost.System, so this enum carries both the stable integer code (matching libtorrent's on-the-wire / ABI value exactly) and the message string that libtorrent_category().message(code) returns.

The integer values are part of libtorrent's ABI and are referenced by other subsystems, so this enum preserves them faithfully, including the gaps left by deprecated NAT-PMP codes (120-124), the reserved ranges, and the version-1 ABI-only bdecode codes (190-196). Those gaps are represented here as RESERVED_n / DEPRECATED_n placeholders so that entries stays a dense, index-addressable table where entries[code].code == code for every code in 0 until ENTRY_COUNT.

This corresponds to the non-deprecated build of libtorrent (i.e. TORRENT_ABI_VERSION != 1): the version-1-only spellings such as unsupported_protocol_version (120) or expected_string (190) collapse into the DEPRECATED_120 / RESERVED_190 placeholders, but their numeric slots and category messages are retained.

Entries

Link copied to clipboard

Not an error

Link copied to clipboard

Two torrents has files which end up overwriting each other

Link copied to clipboard

A piece did not match its piece hash

Link copied to clipboard

The .torrent file does not contain a bencoded dictionary at its top level

Link copied to clipboard

The .torrent file does not have an info dictionary

Link copied to clipboard

The .torrent file's info entry is not a dictionary

Link copied to clipboard

The .torrent file does not have a piece length entry

Link copied to clipboard

The .torrent file does not have a name entry

Link copied to clipboard

The .torrent file's name entry is invalid

Link copied to clipboard

The length of a file, or of the whole .torrent file is invalid. Either negative or not an integer

Link copied to clipboard

Failed to parse a file entry in the .torrent

Link copied to clipboard

The pieces field is missing or invalid in the .torrent file

Link copied to clipboard

The pieces string has incorrect length

Link copied to clipboard

The .torrent file has more pieces than is supported by libtorrent

Link copied to clipboard

The metadata (.torrent file) that was received from the swarm matched the info-hash, but failed to be parsed

Link copied to clipboard

The file or buffer is not correctly bencoded

Link copied to clipboard

The .torrent file does not contain any files

Link copied to clipboard

The string was not properly url-encoded as expected

Link copied to clipboard

Operation is not permitted since the session is shutting down

Link copied to clipboard

There's already a torrent with that info-hash added to the session

Link copied to clipboard

The supplied torrent_handle is not referring to a valid torrent

Link copied to clipboard

The type requested from the entry did not match its type

Link copied to clipboard

The specified URI does not contain a valid info-hash

Link copied to clipboard

One of the files in the torrent was unexpectedly small. This might be caused by files being changed by an external process

Link copied to clipboard

The URL used an unknown protocol. Currently http and https (if built with openssl support) are recognized. For trackers udp is recognized as well.

Link copied to clipboard

The URL did not conform to URL syntax and failed to be parsed

Link copied to clipboard

The peer sent a piece message of length 0

Link copied to clipboard

A bencoded structure was corrupt and failed to be parsed

Link copied to clipboard

The fast resume file was missing or had an invalid file version tag

Link copied to clipboard

The fast resume file was missing or had an invalid info-hash

Link copied to clipboard

The info-hash did not match the torrent

Link copied to clipboard

The URL contained an invalid hostname

Link copied to clipboard

The URL had an invalid port

Link copied to clipboard

The port is blocked by the port-filter, and prevented the connection

Link copied to clipboard

The IPv6 address was expected to end with "]"

Link copied to clipboard

The torrent is being destructed, preventing the operation to succeed

Link copied to clipboard

The connection timed out

Link copied to clipboard

The peer is upload only, and we are upload only. There's no point in keeping the connection

Link copied to clipboard

The peer is upload only, and we're not interested in it. There's no point in keeping the connection

Link copied to clipboard

The peer sent an unknown info-hash

Link copied to clipboard

The torrent is paused, preventing the operation from succeeding

Link copied to clipboard

The peer sent an invalid have message, either wrong size or referring to a piece that doesn't exist in the torrent

Link copied to clipboard

The bitfield message had the incorrect size

Link copied to clipboard

The peer kept requesting pieces after it was choked, possible abuse attempt.

Link copied to clipboard

The peer sent a piece message that does not correspond to a piece request sent by the client

Link copied to clipboard

memory allocation failed

Link copied to clipboard

The torrent is aborted, preventing the operation to succeed

Link copied to clipboard

The peer is a connection to ourself, no point in keeping it

Link copied to clipboard

The peer sent a piece message with invalid size, either negative or greater than one block

Link copied to clipboard

The peer has not been interesting or interested in us for too long, no point in keeping it around

Link copied to clipboard

The peer has not said anything in a long time, possibly dead

Link copied to clipboard

The peer did not send a handshake within a reasonable amount of time, it might not be a bittorrent peer

Link copied to clipboard

The peer has been unchoked for too long without requesting any data. It might be lying about its interest in us

Link copied to clipboard

The peer sent an invalid choke message

Link copied to clipboard

The peer send an invalid unchoke message

Link copied to clipboard

The peer sent an invalid interested message

Link copied to clipboard

The peer sent an invalid not-interested message

Link copied to clipboard

The peer sent an invalid piece request message

Link copied to clipboard

The peer sent an invalid hash-list message (this is part of the merkle-torrent extension)

Link copied to clipboard

The peer sent an invalid hash-piece message (this is part of the merkle-torrent extension)

Link copied to clipboard

The peer sent an invalid cancel message

Link copied to clipboard

The peer sent an invalid DHT port-message

Link copied to clipboard

The peer sent an invalid suggest piece-message

Link copied to clipboard

The peer sent an invalid have all-message

Link copied to clipboard

The peer sent an invalid have none-message

Link copied to clipboard

The peer sent an invalid reject message

Link copied to clipboard

The peer sent an invalid allow fast-message

Link copied to clipboard

The peer sent an invalid extension message ID

Link copied to clipboard

The peer sent an invalid message ID

Link copied to clipboard

The synchronization hash was not found in the encrypted handshake

Link copied to clipboard

The encryption constant in the handshake is invalid

Link copied to clipboard

The peer does not support plain text, which is the selected mode

Link copied to clipboard

The peer does not support RC4, which is the selected mode

Link copied to clipboard

The peer does not support any of the encryption modes that the client supports

Link copied to clipboard

The peer selected an encryption mode that the client did not advertise and does not support

Link copied to clipboard

The pad size used in the encryption handshake is of invalid size

Link copied to clipboard

The encryption handshake is invalid

Link copied to clipboard

The client is set to not support incoming encrypted connections and this is an encrypted connection

Link copied to clipboard

The client is set to not support incoming regular bittorrent connections, and this is a regular connection

Link copied to clipboard

The client is already connected to this peer-ID

Link copied to clipboard

Torrent was removed

Link copied to clipboard

The packet size exceeded the upper sanity check-limit

Link copied to clipboard
Link copied to clipboard

The web server responded with an error

Link copied to clipboard

The web server response is missing a location header

Link copied to clipboard

The web seed redirected to a path that no longer matches the .torrent directory structure

Link copied to clipboard

The connection was closed because it redirected to a different URL

Link copied to clipboard

The HTTP range header is invalid

Link copied to clipboard

The HTTP response did not have a content length

Link copied to clipboard

The IP is blocked by the IP filter

Link copied to clipboard

At the connection limit

Link copied to clipboard

The peer is marked as banned

Link copied to clipboard

The torrent is stopping, causing the operation to fail

Link copied to clipboard

The peer has sent too many corrupt pieces and is banned

Link copied to clipboard

The torrent is not ready to receive peers

Link copied to clipboard

The peer is not completely constructed yet

Link copied to clipboard

The session is closing, causing the operation to fail

Link copied to clipboard

The peer was disconnected in order to leave room for a potentially better peer

Link copied to clipboard

The torrent is finished

Link copied to clipboard

No UPnP router found

Link copied to clipboard

The metadata message says the metadata exceeds the limit

Link copied to clipboard

The peer sent an invalid metadata request message

Link copied to clipboard

The peer advertised an invalid metadata size

Link copied to clipboard

The peer sent a message with an invalid metadata offset

Link copied to clipboard

The peer sent an invalid metadata message

Link copied to clipboard

The peer sent a peer exchange message that was too large

Link copied to clipboard

The peer sent an invalid peer exchange message

Link copied to clipboard

The peer sent an invalid tracker exchange message

Link copied to clipboard

The peer sent an pex messages too often. This is a possible attempt of and attack

Link copied to clipboard

The operation failed because it requires the torrent to have the metadata (.torrent file) and it doesn't have it yet. This happens for magnet links before they have downloaded the metadata, and also torrents added by URL.

Link copied to clipboard

The peer sent an invalid dont_have message. The don't have message is an extension to allow peers to advertise that the no longer has a piece they previously had.

Link copied to clipboard

The peer tried to connect to an SSL torrent without connecting over SSL.

Link copied to clipboard

The peer tried to connect to a torrent with a certificate for a different torrent.

Link copied to clipboard

the torrent is not an SSL torrent, and the operation requires an SSL torrent

Link copied to clipboard

peer was banned because its listen port is within a banned port range, as specified by the port_filter.

Link copied to clipboard

The session_handle is not referring to a valid session_impl

Link copied to clipboard

the listen socket associated with this request was closed

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

The resume data file is missing the file sizes entry

Link copied to clipboard

The resume data file file sizes entry is empty

Link copied to clipboard

The resume data file is missing the pieces and slots entry

Link copied to clipboard

The number of files in the resume data does not match the number of files in the torrent

Link copied to clipboard

One of the files on disk has a different size than in the fast resume file

Link copied to clipboard

One of the files on disk has a different timestamp than in the fast resume file

Link copied to clipboard

The resume data file is not a dictionary

Link copied to clipboard

The blocks per piece entry is invalid in the resume data file

Link copied to clipboard

The resume file is missing the slots entry, which is required for torrents with compact allocation. DEPRECATED

Link copied to clipboard

The resume file contains more slots than the torrent

Link copied to clipboard

The slot entry is invalid in the resume data

Link copied to clipboard

One index in the slot list is invalid

Link copied to clipboard

The pieces on disk needs to be re-ordered for the specified allocation mode. This happens if you specify sparse allocation and the files on disk are using compact storage. The pieces needs to be moved to their right position. DEPRECATED

Link copied to clipboard

this error is returned when asking to save resume data and specifying the flag to only save when there's anything new to save (torrent_handle::only_if_modified) and there wasn't anything changed.

Link copied to clipboard

the save_path in add_torrent_params is not valid

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

The HTTP header was not correctly formatted

Link copied to clipboard

The HTTP response was in the 300-399 range but lacked a location header

Link copied to clipboard

The HTTP response was encoded with gzip or deflate but decompressing it failed

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

The URL specified an i2p address, but no i2p router is configured

Link copied to clipboard

i2p acceptor is not available yet, can't announce without endpoint

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

The tracker URL doesn't support transforming it into a scrape URL. i.e. it doesn't contain "announce.

Link copied to clipboard

invalid tracker response

Link copied to clipboard

invalid peer dictionary entry. Not a dictionary

Link copied to clipboard

tracker sent a failure message

Link copied to clipboard

missing or invalid files entry

Link copied to clipboard

missing or invalid hash entry

Link copied to clipboard

missing or invalid peers and peers6 entry

Link copied to clipboard

UDP tracker response packet has invalid size

Link copied to clipboard

invalid transaction id in UDP tracker response

Link copied to clipboard

invalid action field in UDP tracker response

Link copied to clipboard

skipped announce (because it's assumed to be unreachable over the given source network interface)

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

random number generation failed

Link copied to clipboard

blocked by SSRF mitigation

Link copied to clipboard

blocked because IDNA host names are banned

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.

Link copied to clipboard

the torrent file has an unknown meta version

Link copied to clipboard

the v2 torrent file has no file tree

Link copied to clipboard

the torrent contains v2 keys but does not specify meta version 2

Link copied to clipboard

the v1 and v2 file metadata does not match

Link copied to clipboard

one or more files are missing piece layer hashes

Link copied to clipboard

a piece layer has the wrong size or failed hash check

Link copied to clipboard

a v2 file entry has no root hash

Link copied to clipboard

the v1 and v2 hashes do not describe the same data

Link copied to clipboard

a file in the v2 metadata has the pad attribute set

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val code: Int

the stable integer error value used by libtorrent.

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard

the human-readable description, matching libtorrent's libtorrent_category().message(code). May be empty for reserved/unused slots.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.