パッケージトップレベル
public dynamic class ArgumentError
継承ArgumentError Inheritance Error Inheritance Object

ArgumentError クラスは、関数で指定された引数がその関数の定義に適合していないために発生するエラーを表します。このエラーは、たとえば、不適切な数の引数、不適切な型の引数、または無効な引数を指定して関数が呼び出されたときなどに発生します。

例の表示

関連項目

エラーイベントおよびステータスへの応答


パブリックプロパティ
 プロパティ定義
 Inheritedconstructor : Object
指定されたオブジェクトインスタンスのクラスオブジェクトまたはコンストラクタ関数への参照です。
Object
 InheritederrorID : int
特定のエラーメッセージに関連付けられた参照番号です。
Error
 Inheritedmessage : String
Error オブジェクトに関連付けられたメッセージです。
Error
 Inheritedname : String
Error オブジェクトの名前です。
Error
 Inheritedprototype : Object
[static] クラスまたは関数オブジェクトのプロトタイプオブジェクトへの参照です。
Object
パブリック Methods
 メソッド定義
  
ArgumentError(message:String = "")
新しい ArgumentError オブジェクトを作成します。
ArgumentError
 Inherited
エラーの構築時にエラーの呼び出しスタックをストリングで返します (デバッガバージョンの Flash Player のみ)。
Error
 Inherited
指定されたプロパティがオブジェクトに定義されているかどうかを示します。
Object
 Inherited
Object クラスのインスタンスが、パラメータとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
Object
 Inherited
指定されたプロパティが存在し、列挙できるかどうかを示します。
Object
 Inherited
ループ処理に対するダイナミックプロパティの可用性を設定します。
Object
 Inherited
デフォルトでは "Error" というストリングを返します。Error.message プロパティが定義されている場合は、その値を返します。
Error
 Inherited
指定されたオブジェクトのプリミティブな値を返します。
Object
コンストラクタの詳細
ArgumentError()コンストラクタ
public 関数 ArgumentError(message:String = "")

新しい ArgumentError オブジェクトを作成します。

パラメータ
message:String (default = "") — エラーに関連付けられたストリングです。

The following example shows how an ArgumentError error is generated and handled within a try..catch statement. The println() function takes one argument, a single string, but because two strings are supplied, the error is thrown. Typically, the compiler might catch such an error, but the this[] syntax in the try statement bypasses the compiler's syntax checking for the function.
 package { import flash.display.Sprite;
    
    public class ArgumentErrorExample extends Sprite { public function ArgumentErrorExample() { println("Hello World");
                
                try { this["println"]("Hello", "World"); } catch(e:ArgumentError) { trace(e); } }
        
        public function println(str:String):void { trace(str); } } }