A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/RangeError.html below:

Adobe ActionScript® 3 (AS3 ) API Reference

Language Version:  ActionScript 3.0 Runtime Versions:  Flash Player 9, AIR 1.0, Flash Lite 4

A RangeError exception is thrown when a numeric value is outside the acceptable range. When working with arrays, referring to an index position of an array item that does not exist will throw a RangeError exception. Using

Number.toExponential()

,

Number.toPrecision()

, and

Number.toFixed()

methods will throw a RangeError exception in cases where the arguments are outside the acceptable range of numbers. You can extend

Number.toExponential()

,

Number.toPrecision()

, and

Number.toFixed()

to avoid throwing a RangeError.

Other situations that cause this exception to be thrown include the following:

View the examples


Public Properties

  Property Defined By   constructor : Object

A reference to the class object or constructor function for a given object instance.

Object   errorID : int

[read-only] Contains the reference number associated with the specific error message.

Error   message : String

Contains the message associated with the Error object.

Error   name : String

Contains the name of the Error object.

Error public function RangeError(message:String = "") Runtime Versions:  Flash Lite 4, Flash Player 9, AIR 1.0

Creates a new RangeError object.

Parameters message:String (default = "") — Contains the message associated with the RangeError object.

More examples


The following example shows how a

RangeError

exception can be generated and handled within a

try..catch

statement.

package {
    import flash.display.Sprite;

    public class RangeErrorExample extends Sprite {

        public function RangeErrorExample() {
            var child:Sprite = new Sprite();
            try {
                addChildAt(child, 1);
            }
            catch(e:RangeError) {
                trace(e);
            }
        }
    }
}

© 2015 Adobe Systems Incorporated. All rights reserved.
Thu Dec 6 2018, 01:12 PM -08:00

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4