Repository navigation
Expand file tree
/
Copy pathProgramFinishedException.h
More file actions
65 lines (49 loc) · 1.86 KB
/
Copy pathProgramFinishedException.h
File metadata and controls
65 lines (49 loc) · 1.86 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
59
60
61
62
63
64
65
/* Program Finished Exception
*
* From: https://github.com/PokemonAutomation/
*
*/
#ifndef PokemonAutomation_ProgramFinishedException_H
#define PokemonAutomation_ProgramFinishedException_H
#include <memory>
#include "ScreenshotException.h"
namespace PokemonAutomation{
class ImageViewRGB32;
class ImageRGB32;
class EventNotificationOption;
struct ProgramInfo;
class ProgramEnvironment;
// Thrown when the program requests a normal stop to the program.
// - This should not be consumed except by the infra.
// - Non-infra are allowed to catch and rethrow this exception.
class ProgramFinishedException : public ScreenshotException{
public:
ProgramFinishedException();
explicit ProgramFinishedException(std::string message);
// Construct exception with message and console information.
// This will take a screenshot and store the console if the stream history if requested later.
explicit ProgramFinishedException(
std::string message,
VideoStream& stream
);
// Construct exception with message with screenshot and (optionally) console information.
// Use the provided screenshot instead of taking one with the console.
// Store the console information (if provided) for stream history if requested later.
explicit ProgramFinishedException(
ErrorReport error_report,
std::string message,
VideoStream* stream,
ImageRGB32 screenshot
);
explicit ProgramFinishedException(
std::string message,
VideoStream* stream,
std::shared_ptr<const ImageRGB32> screenshot
);
virtual Color color() const override{ return COLOR_GREEN; }
public:
virtual void log(Logger& logger) const override;
virtual const char* name() const override{ return "ProgramFinishedException"; }
};
}
#endif