diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-03-09 23:42:25 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-03-09 23:42:25 +0100 |
commit | b2c803a378695026f12aabc3729eb2139bee1b2c (patch) | |
tree | 0629e45a270f15941bf0013ccc458d23c74b77d2 /logic/VersionFile.cpp | |
parent | ffff2cd3248a574d3d666731580ac7b8c33e1735 (diff) | |
download | MultiMC-b2c803a378695026f12aabc3729eb2139bee1b2c.tar MultiMC-b2c803a378695026f12aabc3729eb2139bee1b2c.tar.gz MultiMC-b2c803a378695026f12aabc3729eb2139bee1b2c.tar.lz MultiMC-b2c803a378695026f12aabc3729eb2139bee1b2c.tar.xz MultiMC-b2c803a378695026f12aabc3729eb2139bee1b2c.zip |
Improve reporting of version file errors.x
Diffstat (limited to 'logic/VersionFile.cpp')
-rw-r--r-- | logic/VersionFile.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/logic/VersionFile.cpp b/logic/VersionFile.cpp index 40dcb0c3..831b086e 100644 --- a/logic/VersionFile.cpp +++ b/logic/VersionFile.cpp @@ -311,9 +311,7 @@ void VersionFile::applyTo(VersionFinal *version) { if (minimumLauncherVersion > CURRENT_MINIMUM_LAUNCHER_VERSION) { - throw VersionBuildError( - QString("%1 is for a different launcher version (%2), current supported is %3") - .arg(filename, minimumLauncherVersion, CURRENT_MINIMUM_LAUNCHER_VERSION)); + throw LauncherVersionError(minimumLauncherVersion, CURRENT_MINIMUM_LAUNCHER_VERSION); } } @@ -322,8 +320,7 @@ void VersionFile::applyTo(VersionFinal *version) if (QRegExp(mcVersion, Qt::CaseInsensitive, QRegExp::Wildcard).indexIn(version->id) == -1) { - throw VersionBuildError( - QString("%1 is for a different version of Minecraft").arg(filename)); + throw MinecraftVersionMismatch(fileId, mcVersion, version->id); } } @@ -471,7 +468,7 @@ void VersionFile::applyTo(VersionFinal *version) (lib->dependType == RawLibrary::Hard && ourVersion != otherVersion)) { throw VersionBuildError( - QString( + QObject::tr( "Error resolving library dependencies between %1 and %2 in %3.") .arg(otherLib->rawName(), lib->name, filename)); } @@ -498,7 +495,7 @@ void VersionFile::applyTo(VersionFinal *version) // it: fail if (lib->dependType == RawLibrary::Hard) { - throw VersionBuildError(QString( + throw VersionBuildError(QObject::tr( "Error resolving library dependencies between %1 and %2 in %3.") .arg(otherLib->rawName(), lib->name, filename)); |