Class Index | Minimal

Classes


Class jabberwerx.ErrorReporter


Extends jabberwerx.JWBase.

This class manages user-friendly strings for error cases.

NOTE: This class should not be created directly. Use the singleton jabberwerx.errorReporter instead.

Class Summary
Constructor Attributes Constructor Name and Description
 

Creates a new ErrorReporter.

Method Summary
Method Attributes Method Name and Description
 
addMessage(key, value)

Adds an entry to the error map to associate an error with user-friendly message.

 

Returns a user-friendly string associated with the error object passed in.

Methods borrowed from class jabberwerx.JWBase:
destroy, getClassName, graphUnserialized, init, invocation, shouldBeSavedWithGraph, shouldBeSerializedInline, toString, wasUnserialized, willBeSerialized
Class Detail
jabberwerx.ErrorReporter()

Creates a new ErrorReporter.

NOTE: This class should not be created directly. Use the singleton jabberwerx.errorReporter instead.

Method Detail
addMessage(key, value)

Adds an entry to the error map to associate an error with user-friendly message.

Parameters:
{string} key
The string representation of the error.
{string} value
The user-friendly message to associate with the key.
Throws:
{TypeError}
if {value} is not a string.

{string} getMessage(err)

Returns a user-friendly string associated with the error object passed in.

Parameters:
{string|Element} err
Error object.
Returns:
{string} Error message associated with err.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 02 2014 13:23:42 GMT-0600 (MDT)