Source: errorCodes.js

/**
 * errorCodes.js
 *
 * Created by Matthias Seemann on 7.01.2013.
 * Copyright (c) 2013 Visisoft GbR. All rights reserved.
 */

define([], function(_)
	{
		/**
		 * API error codes
		 * @enum {number} ErrorCode
		 * @readonly
		 * @memberof LiveSupport.VisitorAPI
		 */
		var ErrorCode = {
			NoError : 0,
			/**
			 * unspecified error
			 */
			GeneralError: 1,
			/**
			 * an inconsistency in the API was detected (programming bug)
			 */
			InternalError: 2,
			/**
			 * a network request took to long to respond
			 */
			TimeoutError: 3,
			/**
			 * A singleton object was attempted to create with <tt>new</tt>.
			 * Use ClassName.sharedClassName() instead.
			 */
			ForbiddenSingletonConstructorError: 4,
			/**
			 * The browser does not support a necessary function
			 */
			UnsupportedBrowser: 5,
			/**
			 * a network request has failed
			 */
			NetworkError: 6,
			/**
			 * {@link LiveSupport.VisitorAPI.associateWithLiveSupportProduct} was not called before
			 * another API method
			 */
			ServerNotYetAssociated : 1000,
			CallToUndefinedMethod: 1001,
			ParameterTypeError: 1002,
			/**
			 * The API is used in a non-applicable web page
			 */
			IllegalUse: 1003
		};

		return ErrorCode;

/// createEnumeration is not IE 6 compatible
//		return _.createEnumeration({
//			NoError : 0,
//			APINotYetConfigured : 1000,
//			CallToUndefinedMethod: 1001,
//			ParameterTypeError: 1002
//		});
	}
);