Repository navigation
Expand file tree
/
Copy pathError.as
More file actions
70 lines (60 loc) · 1.69 KB
/
Copy pathError.as
File metadata and controls
70 lines (60 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package
{
public dynamic class Error extends Object
{
public static const length:int = 1;
public var message:Object;
public var name:String;
private var _errorID:int;
public function Error(message:* = "", id:* = 0)
{
super();
this.message = message;
this._errorID = id;
this.name ;
}
public static function getErrorMessage(param1:int) : String{return null}
public static function throwError(type:Class, index:uint, ... rest) : *
{
var i:* = 0;
var f:* = function(match:*, pos:*, string:*):*
{
var arg_num:* = -1;
switch(match.charAt(1))
{
case "1":
break;
case "2":
arg_num = 1;
break;
case "3":
arg_num = 2;
break;
case "4":
arg_num = 3;
break;
case "5":
arg_num = 4;
break;
case "6":
case 6:
arg_num = 5;
break;
default:
arg_num = 0;
}
if(arg_num > -1 && rest.length > arg_num)
{
return rest[arg_num];
}
return "";
};
throw new type(Error.getErrorMessage(index).replace(new RegExp("%[0-9]","g"),f),index);
}
public function getStackTrace() : String{return null}
public function get errorID() : int
{
return this._errorID;
}
}
}