summaryrefslogtreecommitdiffstats
path: root/logic/minecraft
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-08 09:28:14 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-08 09:28:14 +0200
commit1ca9fc8961a48ba8d8da06601cd64583a577da2a (patch)
tree72ddfcd5877a5ffe485f78b84c303d02474450d5 /logic/minecraft
parentb8cdcdb96b4267e5dd9f4df2728df3a1dfb9ecf7 (diff)
downloadMultiMC-1ca9fc8961a48ba8d8da06601cd64583a577da2a.tar
MultiMC-1ca9fc8961a48ba8d8da06601cd64583a577da2a.tar.gz
MultiMC-1ca9fc8961a48ba8d8da06601cd64583a577da2a.tar.lz
MultiMC-1ca9fc8961a48ba8d8da06601cd64583a577da2a.tar.xz
MultiMC-1ca9fc8961a48ba8d8da06601cd64583a577da2a.zip
NOISSUE catch more errors from nbt lib
Diffstat (limited to 'logic/minecraft')
-rw-r--r--logic/minecraft/World.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/logic/minecraft/World.cpp b/logic/minecraft/World.cpp
index 4ef7845f..977a03cf 100644
--- a/logic/minecraft/World.cpp
+++ b/logic/minecraft/World.cpp
@@ -72,6 +72,13 @@ void World::repath(const QFileInfo &file)
catch(std::out_of_range e)
{
// fallback for old world formats
+ qWarning() << "String NBT tag" << name << "could not be found. Defaulting to" << fallback;
+ return fallback;
+ }
+ catch(std::bad_cast e)
+ {
+ // type mismatch
+ qWarning() << "NBT tag" << name << "could not be converted to string. Defaulting to" << fallback;
return fallback;
}
};
@@ -91,6 +98,13 @@ void World::repath(const QFileInfo &file)
catch(std::out_of_range e)
{
// fallback for old world formats
+ qWarning() << "Long NBT tag" << name << "could not be found. Defaulting to" << fallback;
+ return fallback;
+ }
+ catch(std::bad_cast e)
+ {
+ // type mismatch
+ qWarning() << "NBT tag" << name << "could not be converted to long. Defaulting to" << fallback;
return fallback;
}
};