summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/VersionBuildError.h
blob: f362c405bc1c3461e4f3db5e0e686e7934f04981 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "Exception.h"

class VersionBuildError : public Exception
{
public:
	explicit VersionBuildError(QString cause) : Exception(cause) {}
	virtual ~VersionBuildError() noexcept
	{
	}
};

/**
 * the base version file was meant for a newer version of the vanilla launcher than we support
 */
class LauncherVersionError : public VersionBuildError
{
public:
	LauncherVersionError(int actual, int supported)
		: VersionBuildError(QObject::tr(
			  "The base version file of this instance was meant for a newer (%1) "
			  "version of the vanilla launcher than this version of MultiMC supports (%2).")
								.arg(actual)
								.arg(supported)) {};
	virtual ~LauncherVersionError() noexcept
	{
	}
};

/**
 * files required for the version are not (yet?) present
 */
class VersionIncomplete : public VersionBuildError
{
public:
	VersionIncomplete(QString missingPatch)
		: VersionBuildError(QObject::tr("Version is incomplete: missing %1.")
								.arg(missingPatch)) {};
	virtual ~VersionIncomplete() noexcept
	{
	}
};