PlayerIO

The fastest way to build online games without breaking a sweat.

HTML5 (Javascript) Client Reference

javascript (html5) errorLog class informationClass errorLog

Language: Javascript (HTML5)

The ErrorLog service. This class has methods for writing custom errors to your game's error log. You can browse your game's error log in the PlayerIO admin panel.

Example

Writing an error to the error log

Methods

 
writeError (error, details, stacktrace, extraData):

Writes an entry to the error log

errorLog.writeError

writeError (error, details, stacktrace, extraData):

Writes an entry to the error log

Arguments

error:string
A short string describing the error without details. Example 'Object not set to instance of an object'
details:string
The message describing the error in detail. Example 'couldn't find the user 'bob' in the current game'
stacktrace:string
The stacktrace (if available) of the error
extraData:object
Any extra data you'd like to associate with the error log entry. Example: {score:200, level:'skyland'}