forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.ts
More file actions
29 lines (23 loc) · 956 Bytes
/
Copy patherrors.ts
File metadata and controls
29 lines (23 loc) · 956 Bytes
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
///<reference path='references.ts' />
module TypeScript {
export class Errors {
public static argument(argument: string, message?: string): Error {
return new Error("Invalid argument: " + argument + ". " + message);
}
public static argumentOutOfRange(argument: string): Error {
return new Error("Argument out of range: " + argument);
}
public static argumentNull(argument: string): Error {
return new Error("Argument null: " + argument);
}
public static abstract(): Error {
return new Error("Operation not implemented properly by subclass.");
}
public static notYetImplemented(): Error {
return new Error("Not yet implemented.");
}
public static invalidOperation(message?: string): Error {
return new Error("Invalid operation: " + message);
}
}
}