Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
crash.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
14 #define BLAM_ASSERT(x) if (!(x)) Blam::Assert(#x, __FILE__, __LINE__)
15 
26 #define BLAM_ASSERTM(x, msg) if (!(x)) Blam::Assert(#x, __FILE__, __LINE__, msg)
27 
28 #ifndef BLAM
29 #define BLAM
30 #endif
31 
36 {
38 };
39 
40 namespace Blam
41 {
51  BLAM void Assert(const char* expression, const char* file, int line);
52 
63  BLAM void Assert(const char* expression, const char* file, int line, std::string message);
64 
68  namespace CrashScreen
69  {
81  BLAM void ShowDetailedCrashScreen(const char* expression, const char* file, int line, std::string details);
82 
92 
101  BLAM void ShowSignalCrashScreen(int signal);
102  }
103 
107  namespace Sentry
108  {
109  BLAM void UploadCrashData();
110 
116  BLAM std::string GetCrashUploadStateMessage();
117 
123  BLAM std::string GetEventID();
124 
125  BLAM void StartSentry();
126 
127  BLAM void ShutdownSentry();
128  }
129 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:18
Blam::CrashScreen::ShowSignalCrashScreen
BLAM void ShowSignalCrashScreen(int signal)
Shows a basic crash screen to the user.
Definition: crash.cpp:71
Blam::Sentry::StartSentry
BLAM void StartSentry()
Definition: sentry.cpp:41
details
LPSTR details
Definition: error_notice.cpp:17
Blam::EngineDefs::CrashScreen
@ CrashScreen
Definition: engine_definitions.h:100
Blam::Sentry::ShutdownSentry
BLAM void ShutdownSentry()
Definition: sentry.cpp:57
Uploading
@ Uploading
Used when prepared Sentry data is being uploaded to the server.
Definition: crash.h:37
BLAM
#define BLAM
Definition: crash.h:29
SentryUploadStatus
SentryUploadStatus
Enumerator for various Sentry upload states.
Definition: crash.h:35
Blam::Assert
BLAM void Assert(const char *expression, const char *file, int line)
Forces an engine assertion failure, and shows the crash screen.
Definition: crash.cpp:10
Blam::Sentry::GetCrashUploadStateMessage
BLAM std::string GetCrashUploadStateMessage()
Retrieves the state of the Sentry data upload.
Definition: sentry.cpp:20
Blam::Sentry::UploadCrashData
BLAM void UploadCrashData()
Definition: sentry.cpp:87
Blam::CrashScreen::ShowBasicCrashScreen
BLAM void ShowBasicCrashScreen()
Shows a basic crash screen to the user.
Definition: crash.cpp:57
Blam::CrashScreen::ShowDetailedCrashScreen
BLAM void ShowDetailedCrashScreen(const char *expression, const char *file, int line, std::string details)
Shows a detailed crash screen to the user, usually caused by an engine assertion.
Definition: crash.cpp:36
Blam::Sentry::GetEventID
BLAM std::string GetEventID()
Retrieves the Event ID generated by Sentry, used to cross-reference bug reports and Sentry data.
Definition: sentry.cpp:36