| パッケージ | トップレベル |
| public dynamic class ArgumentError | |
| 継承 | ArgumentError Error Object |
関連項目
| メソッド | 定義 | ||
|---|---|---|---|
|
ArgumentError(message:String = "")
新しい ArgumentError オブジェクトを作成します。
| ArgumentError | ||
![]() |
エラーの構築時にエラーの呼び出しスタックをストリングで返します (デバッガバージョンの Flash Player のみ)。
| Error | |
![]() |
指定されたプロパティがオブジェクトに定義されているかどうかを示します。
| Object | |
![]() |
Object クラスのインスタンスが、パラメータとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
| Object | |
![]() |
指定されたプロパティが存在し、列挙できるかどうかを示します。
| Object | |
![]() |
ループ処理に対するダイナミックプロパティの可用性を設定します。
| Object | |
![]() |
デフォルトでは
"Error" というストリングを返します。Error.message プロパティが定義されている場合は、その値を返します。 | Error | |
![]() |
指定されたオブジェクトのプリミティブな値を返します。
| Object | |
| ArgumentError | () | コンストラクタ |
public 関数 ArgumentError(message:String = "")新しい ArgumentError オブジェクトを作成します。
パラメータmessage:String (default = "") — エラーに関連付けられたストリングです。
|
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); } } }