mirror of
https://github.com/asamy/ctorrent
synced 2025-10-05 23:52:41 +02:00
purge unsafe_cast uses
This commit is contained in:
13
main.cpp
13
main.cpp
@@ -114,16 +114,9 @@ int main(int argc, char *argv[])
|
||||
std::string file = files[i];
|
||||
Torrent *t = &torrents[i];
|
||||
|
||||
try {
|
||||
// yes, it won't throw exception in some cases... may sound bad but whatever
|
||||
std::clog << "Opening: " << file << std::endl;
|
||||
if (!t->open(file, dldir)) {
|
||||
std::cerr << file << ": corrupted torrent file" << std::endl;
|
||||
++errors;
|
||||
continue;
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
std::cerr << file << ": failed to load torrent file: " << e.what() << std::endl;
|
||||
std::clog << "Opening: " << file << std::endl;
|
||||
if (!t->open(file, dldir)) {
|
||||
std::cerr << file << ": corrupted torrent file" << std::endl;
|
||||
++errors;
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user