Package | com.smartfoxserver.v2.util |
Class | public class SFSErrorCodes |
Inheritance | SFSErrorCodes Object |
Error messages are provided by default in the English language but they can be localized and substituted in any other language. The error 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. Please make sure you maintain these placeholders while translating the messages.
For more informations please check this link: http://docs2x.smartfoxserver.com/AdvancedTopics/client-error-messages
Method | Defined By | ||
---|---|---|---|
setErrorMessage(code:int, message:String):void [static]
Sets the text of the error message corresponding to the passed error code. | SFSErrorCodes |
setErrorMessage | () | method |
public static function setErrorMessage(code:int, message:String):void
Sets the text of the error message corresponding to the passed error code.
NOTE: you have to make sure you maintain all the placeholders while modifying the messages.
Parameters
code:int — The code of the error message to be modified.
| |
message:String — The new error message, including the placeholders for runtime informations.
|
private function someMethod():void { SFSErrorCodes.setErrorMessage(13, "Le Groupe demandé n'est pas disponible - Salle: {0}; Groupe: {1}"); }