ReportException
[Player Network SDK & MSDK]
Firebase supports reporting exception information for C#, Lua, JS, and other programming languages.
CrashSight supports reporting exception information for C, C++, C#, Java, Object-C, Swift, and other programming languages.
Supported channels: Firebase, CrashSight
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows
platform.Supports
Android, iOS, Windows
platform.note
MSDK currently does not support Windows.
Function Definition
- Unity
- Unreal Engine
void ReportException(
int type,
string exceptionName,
string exceptionMsg,
string exceptionStack,
Dictionary<string, string> extInfo);
static void ReportException(
int type,
const std::string &exception_name,
const std::string &exception_msg,
const std::string &exception_stack,
const std::map<std::string, std::string> &ext_info);
Input Parameters
- Unity
- Unreal Engine
Parameter | Type | Description |
---|---|---|
type | int | Language type 3: cocoa 4: C# 5: JS 6: Lua |
exceptionName | string | Exception name |
exceptionMsg | string | Exception message |
exceptionStack | string | Exception stack |
extInfo | Dictionary<string, string> | The extended field for additional information on the exception |
Parameter | Type | Description |
---|---|---|
type | int | Language type 3: cocoa 4: C# 5: JS 6: Lua |
exception_name | std::string | Exception name |
exception_msg | std::string | Exception message |
exception_stack | std::string | Exception stack |
ext_info | std::map<std::string, std::string> | The extended field for additional information on the exception |
Code Sample
- Unity
- Unreal Engine
Dictionary<string, string> paramsDic = new Dictionary<string, string>();
// Add key-value pair
UnionAdapterAPI.GetCrashService().ReportException(5, "crashName", "message", "stack", paramsDic);
std::map < std::string, std::string> _params_map;
// Add key-value pair
GUA_NAMESPACE::GUACrashService::ReportException(5, "CrashName", "Message", "Stack", _params_map);