forked from rileytestut/AltServer-Windows
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathInstallError.hpp
More file actions
executable file
·58 lines (46 loc) · 1.19 KB
/
InstallError.hpp
File metadata and controls
executable file
·58 lines (46 loc) · 1.19 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// InstallError.h
// AltServer-Windows
//
// Created by Riley Testut on 8/31/19.
// Copyright © 2019 Riley Testut. All rights reserved.
//
#ifndef InstallError_h
#define InstallError_h
#include "Error.hpp"
enum class InstallErrorCode
{
Cancelled,
NoTeam,
MissingPrivateKey,
MissingCertificate,
MissingInfoPlist,
};
class InstallError: public Error
{
public:
InstallError(InstallErrorCode code) : Error((int)code)
{
}
virtual std::string domain() const
{
return "AltServer.OperationError";
}
virtual std::optional<std::string> localizedFailureReason() const
{
switch ((InstallErrorCode)this->code())
{
case InstallErrorCode::Cancelled:
return "The operation was cancelled.";
case InstallErrorCode::NoTeam:
return "You are not a member of any developer teams.";
case InstallErrorCode::MissingPrivateKey:
return "The developer certificate's private key could not be found.";
case InstallErrorCode::MissingCertificate:
return "The developer certificate could not be found.";
case InstallErrorCode::MissingInfoPlist:
return "The app's Info.plist could not be found.";
}
}
};
#endif /* InstallError_h */