Skip to content

Error Event

Martin Treacy-Schwartz edited this page Dec 21, 2016 · 5 revisions

##Error Events

Used to track custom error events in the game. You can group the events by severity level and attach a message.

To add a custom error event call the following function:

  • C++: gameanalytics::cocos2d::GameAnalytics::addErrorEvent(gameanalytics::cocos2d::EGAErrorSeverity::Debug, "Something went bad in some of the smelly code!");
  • JS: ga.GameAnalytics.addErrorEvent(ga.EGAErrorSeverity.Debug, "Something went bad in some of the smelly code!");
  • Lua: ga.GameAnalytics:addErrorEvent(ga.EGAErrorSeverity.Debug, "Something went bad in some of the smelly code!")

Field Type Description Example
severity enum Severity of error gameanalytics::cocos2d::EGAErrorSeverity::Debug
gameanalytics::cocos2d::EGAErrorSeverity::Info
gameanalytics::cocos2d::�EGAErrorSeverity::Warning
gameanalytics::cocos2d::EGAErrorSeverity::Error
gameanalytics::cocos2d::EGAErrorSeverity::Critical
message string Error message (can be null) "Error when entering level12"

> ℹ️ > For more information on the error event go [here](http://www.gameanalytics.com/docs/ga-data/).



[NEXT  →](Design Event)

Clone this wiki locally