 	{
 		// TextField throws this RTE if a null value is set.
 		if (value == null)
-			throw new TypeError("Parameter text must be non-null.");
+		{
+			var message:String = getErrorMessage("nullParameter", "text");
+			throw new TypeError(message);
+		}
 		
 		// Note: We don't return early if value == _text
 		// because the defaultTextFormat may have changed

		
		// TextField throws this RTE when invalid values are set.
		if (lineIndex < 0 || lineIndex >= numChildren)
			throw new RangeError("The supplied index is out of bounds");
		
		// The nth line is the nth child.
		var textLine:TextLine = TextLine(getChildAt(lineIndex));

		_textHeight = Math.round(bounds.height);
	}

	/**
	 *  @private
	 *  Provides RTE messages.
	 *  FTETextField is deliberately kept independent
	 *  of the rest of the Flex framework.
	 *  Therefore it doesn't have access to localized resource strings
	 *  in the ResourceManager and simply has hard-coded English Strings.
	 *  However, framework subclasses such as UIFTETextField override
	 *  this method to provide localized messages from ResourceManager.
	 */
	mx_internal function getErrorMessage(key:String, param:String = null):String
	{
		var message:String = "";
		
		switch (key)
		{
			case "badParameter":
			{
				// This message matches the one in Flash Player.
				message = "Parameter " + param + " must be one of the accepted values.";
				break;
			}
				
			case "nullParameter":
			{
				// This message matches the one in Flash Player.
				message = "Parameter " + param + " must be non-null.";
				break;
			}
				
			case "badIndex":
			{
				// This message matches the one in Flash Player.
				message = "The supplied index is out of bounds.";
				break;
			}
				
			case "notImplementedInFTETextField":
			{
				message = "'" + param + "' is not implemented in FTETextField.";
				break;
			}
				
			case "unsupportedTypeInFTETextField":
			{
				message = "FTETextField does not support setting type to \"input\".";
				break;
			}
		}
		
		return message;
	}
	
	/**
	 *  @private
	 */
	private function notImplemented(name:String):String
	{
		return getErrorMessage("notImplementedInFTETextField", name);
	}
	
	//--------------------------------------------------------------------------
	//
	//  Event handlers
