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
Two torrents has files which end up overwriting each other
A piece did not match its piece hash
The .torrent file does not contain a bencoded dictionary at its top level
The .torrent file does not have an info dictionary
The .torrent file's info entry is not a dictionary
The .torrent file does not have a piece length entry
The .torrent file does not have a name entry
The .torrent file's name entry is invalid
The length of a file, or of the whole .torrent file is invalid. Either negative or not an integer
Failed to parse a file entry in the .torrent
The pieces field is missing or invalid in the .torrent file
The pieces string has incorrect length
The .torrent file has more pieces than is supported by libtorrent
The metadata (.torrent file) that was received from the swarm matched the info-hash, but failed to be parsed
The file or buffer is not correctly bencoded
The .torrent file does not contain any files
The string was not properly url-encoded as expected
Operation is not permitted since the session is shutting down
There's already a torrent with that info-hash added to the session
The supplied torrent_handle is not referring to a valid torrent
The type requested from the entry did not match its type
The specified URI does not contain a valid info-hash
One of the files in the torrent was unexpectedly small. This might be caused by files being changed by an external process
The URL used an unknown protocol. Currently http and https (if built with openssl support) are recognized. For trackers udp is recognized as well.
The URL did not conform to URL syntax and failed to be parsed
The peer sent a piece message of length 0
A bencoded structure was corrupt and failed to be parsed
The fast resume file was missing or had an invalid file version tag
The fast resume file was missing or had an invalid info-hash
The info-hash did not match the torrent
The URL contained an invalid hostname
The URL had an invalid port
The port is blocked by the port-filter, and prevented the connection
The IPv6 address was expected to end with "]"
The torrent is being destructed, preventing the operation to succeed
The peer is upload only, and we are upload only. There's no point in keeping the connection
The peer is upload only, and we're not interested in it. There's no point in keeping the connection
The peer sent an unknown info-hash
The torrent is paused, preventing the operation from succeeding
The peer sent an invalid have message, either wrong size or referring to a piece that doesn't exist in the torrent
The bitfield message had the incorrect size
The peer kept requesting pieces after it was choked, possible abuse attempt.
The peer sent a piece message that does not correspond to a piece request sent by the client
The torrent is aborted, preventing the operation to succeed
The peer is a connection to ourself, no point in keeping it
The peer sent a piece message with invalid size, either negative or greater than one block
The peer has not been interesting or interested in us for too long, no point in keeping it around
The peer has not said anything in a long time, possibly dead
The peer did not send a handshake within a reasonable amount of time, it might not be a bittorrent peer
The peer has been unchoked for too long without requesting any data. It might be lying about its interest in us
The peer sent an invalid choke message
The peer send an invalid unchoke message
The peer sent an invalid interested message
The peer sent an invalid not-interested message
The peer sent an invalid piece request message
The peer sent an invalid hash-list message (this is part of the merkle-torrent extension)
The peer sent an invalid hash-piece message (this is part of the merkle-torrent extension)
The peer sent an invalid cancel message
The peer sent an invalid DHT port-message
The peer sent an invalid suggest piece-message
The peer sent an invalid have all-message
The peer sent an invalid have none-message
The peer sent an invalid reject message
The peer sent an invalid allow fast-message
The peer sent an invalid extension message ID
The peer sent an invalid message ID
The synchronization hash was not found in the encrypted handshake
The encryption constant in the handshake is invalid
The peer does not support plain text, which is the selected mode
The peer does not support RC4, which is the selected mode
The peer does not support any of the encryption modes that the client supports
The peer selected an encryption mode that the client did not advertise and does not support
The pad size used in the encryption handshake is of invalid size
The encryption handshake is invalid
The client is set to not support incoming encrypted connections and this is an encrypted connection
The client is set to not support incoming regular bittorrent connections, and this is a regular connection
The client is already connected to this peer-ID
Torrent was removed
The packet size exceeded the upper sanity check-limit
The web server responded with an error
The web server response is missing a location header
The web seed redirected to a path that no longer matches the .torrent directory structure
The connection was closed because it redirected to a different URL
The HTTP range header is invalid
The HTTP response did not have a content length
The IP is blocked by the IP filter
At the connection limit
The peer is marked as banned
The torrent is stopping, causing the operation to fail
The peer has sent too many corrupt pieces and is banned
The torrent is not ready to receive peers
The peer is not completely constructed yet
The session is closing, causing the operation to fail
The peer was disconnected in order to leave room for a potentially better peer
The torrent is finished
The metadata message says the metadata exceeds the limit
The peer sent an invalid metadata request message
The peer advertised an invalid metadata size
The peer sent a message with an invalid metadata offset
The peer sent an invalid metadata message
The peer sent a peer exchange message that was too large
The peer sent an invalid peer exchange message
The peer sent an invalid tracker exchange message
The peer sent an pex messages too often. This is a possible attempt of and attack
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.
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.
The peer tried to connect to an SSL torrent without connecting over SSL.
The peer tried to connect to a torrent with a certificate for a different torrent.
the torrent is not an SSL torrent, and the operation requires an SSL torrent
peer was banned because its listen port is within a banned port range, as specified by the port_filter.
The session_handle is not referring to a valid session_impl
the listen socket associated with this request was closed
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
The resume data file is missing the file sizes entry
The resume data file file sizes entry is empty
The resume data file is missing the pieces and slots entry
The number of files in the resume data does not match the number of files in the torrent
One of the files on disk has a different size than in the fast resume file
One of the files on disk has a different timestamp than in the fast resume file
The resume data file is not a dictionary
The blocks per piece entry is invalid in the resume data file
The resume file is missing the slots entry, which is required for torrents with compact allocation. DEPRECATED
The resume file contains more slots than the torrent
The slot entry is invalid in the resume data
One index in the slot list is invalid
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
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.
the save_path in add_torrent_params is not valid
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
The HTTP header was not correctly formatted
The HTTP response was in the 300-399 range but lacked a location header
The HTTP response was encoded with gzip or deflate but decompressing it failed
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
The URL specified an i2p address, but no i2p router is configured
i2p acceptor is not available yet, can't announce without endpoint
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
The tracker URL doesn't support transforming it into a scrape URL. i.e. it doesn't contain "announce.
invalid tracker response
invalid peer dictionary entry. Not a dictionary
tracker sent a failure message
missing or invalid files entry
missing or invalid hash entry
missing or invalid peers and peers6 entry
UDP tracker response packet has invalid size
invalid transaction id in UDP tracker response
invalid action field in UDP tracker response
skipped announce (because it's assumed to be unreachable over the given source network interface)
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
random number generation failed
blocked by SSRF mitigation
blocked because IDNA host names are banned
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
Reserved / unused slot, present only to preserve the integer values of the surrounding error codes.
the torrent file has an unknown meta version
the v2 torrent file has no file tree
the torrent contains v2 keys but does not specify meta version 2
the v1 and v2 file metadata does not match
one or more files are missing piece layer hashes
a piece layer has the wrong size or failed hash check
a v2 file entry has no root hash
the v1 and v2 hashes do not describe the same data
a file in the v2 metadata has the pad attribute set
Properties
Functions
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.)
Returns an array containing the constants of this enum type, in the order they're declared.