-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRandomOrgErrors.d.ts
More file actions
90 lines (90 loc) · 3 KB
/
Copy pathRandomOrgErrors.d.ts
File metadata and controls
90 lines (90 loc) · 3 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
export class RandomOrgBadHTTPResponseError extends Error {
/**
* Constructs a new exception with the specified detail message.
* @param {string} message The detail message.
*/
constructor(message: string);
}
export class RandomOrgInsufficientBitsError extends Error {
/**
* Constructs a new exception with the specified detail message.
* @constructor
* @param {string} message The detail message.
* @param {number} bits Bits remaining just before the error was thrown.
*/
constructor(message: string, bits: number);
/**
* Gets the number of bits remaining.
* @returns {number} The number of bits left.
*/
getBitsLeft(): number;
#private;
}
export class RandomOrgInsufficientRequestsError extends Error {
/**
* Constructs a new exception with the specified detail message.
* @constructor
* @param {string} message The detail message.
*/
constructor(message: string);
}
export class RandomOrgJSONRPCError extends Error {
/**
* Constructs a new exception with the specified detail message.
* @constructor
* @param {string} message The detail message.
*/
constructor(message: string);
}
export class RandomOrgKeyNotRunningError extends Error {
/**
* Error thrown by the RandomOrgClient class when its API key has been stopped.
* Requests will not complete while API key is in the stopped state.
* @constructor
* @param {string} message The detail message.
*/
constructor(message: string);
}
export class RandomOrgRANDOMORGError extends Error {
/**
* Error thrown by the RandomOrgClient class when the server returns a
* RANDOM.ORG Error. See https://api.random.org/json-rpc/4/error-codes
* @constructor
* @param {string} message The detail message.
* @param {number=} [code=-1] The error code.
*/
constructor(message: string, code?: number | undefined);
/**
* Gets the RANDOM.ORG error code, see
* https://api.random.org/json-rpc/4/error-codes
* @returns {number} The error code.
*/
getCode(): number;
#private;
}
export class RandomOrgSendTimeoutError extends Error {
/**
* Error thrown by the RandomOrgClient class when its set blocking timeout is
* exceeded before the request can be sent.
* @constructor
* @param {string} message The detail message.
*/
constructor(message: string);
}
export class RandomOrgCacheEmptyError extends Error {
/**
* Error thrown when data retrieval from an emtpy RandomOrgCache is attempted.
* @constructor
* @param {string} message The detail message.
* @param {boolean} paused Reflects whether the RandomOrgCache instance was
* paused when this error was thrown.
*/
constructor(message: string, paused?: boolean);
/**
* Returns whether the cache was paused at the time when the
* error was thrown.
* @returns {boolean} True if paused, false otherwise.
*/
wasPaused(): boolean;
#private;
}