SFSErrorCodes

Gives access to server error codes and relative error messages for translation purpose.


Error messages are provided by default in English language, but they can be localized in any other language. The messages contain special placeholders that are processed at runtime and substituted with runtime data. They are in the form of a number enclosed in curly brackets such as: {0}, {1}, etc. Make sure you maintain those placeholders when translating the messages.

For more information check the SmartFoxServer documentation.

Methods

(static) setErrorMessage(code, message)

Sets the text of the error message corresponding to the passed error code.
Parameters:
NameTypeDescription
codenumberThe code of the error message to be modified.
messagestringThe new error message, including the placeholders for runtime informations.