@@ -21,14 +21,24 @@ Common error classes and utility functions
21
21
* [ ArgumentError] ( #argument )
22
22
* [ ArgumentNullError] ( #argumentnull )
23
23
* [ AuthenticationRequiredError] ( #authrequired )
24
+ * [ ConnectionError] ( #connection )
25
+ * [ DataError] ( #data )
26
+ * [ MemcacedError] ( #memcached )
27
+ * [ MongoDBError] ( #mongodb )
28
+ * [ RedisError] ( #redis )
29
+ * [ RollbackError] ( #rollback )
30
+ * [ SQLError] ( #sql )
31
+ * [ TransactionError] ( #transaction )
24
32
* [ Error] ( #error )
25
33
* [ HttpStatusError] ( #httpstatus )
34
+ * [ InvalidOperationError] ( #invalidoperation )
26
35
* [ IOError] ( #io )
27
36
* [ DirectoryNotFoundError] ( #directorynotfound )
28
37
* [ DriveNotFoundError] ( #drivenotfound )
29
38
* [ EndOfStreamError] ( #endofstream )
30
39
* [ FileLoadError] ( #fileload )
31
40
* [ FileNotFoundError] ( #filenotfound )
41
+ * [ SocketError] ( #socket )
32
42
* [ NotFoundError] ( #notfound )
33
43
* [ NotImplementedError] ( #notimplemented )
34
44
* [ NotPermittedError] ( #notpermitted )
@@ -38,6 +48,7 @@ Common error classes and utility functions
38
48
* [ ReferenceError] ( #reference )
39
49
* [ StackOverflowError] ( #stackoverflow )
40
50
* [ SyntaxError] ( #syntax )
51
+ * [ TimeoutError] ( #timeout )
41
52
* [ TypeError] ( #type )
42
53
* [ URIError] ( #uri )
43
54
* [ ValidationError] ( #validation )
@@ -113,6 +124,25 @@ throw new errors.ArgumentNullError('username', err);
113
124
114
125
---------------------------------------
115
126
127
+ <a name =" connection " />
128
+ ### ConnectionError
129
+
130
+ Applicable when an error occurs on a connection.
131
+
132
+ new ConnectionError(message[, inner_error])
133
+
134
+ __ Arguments__
135
+
136
+ * ` message ` - any message
137
+ * ` inner_error ` - the Error instance that caused the current error. Stack trace will be appended.
138
+
139
+ ``` js
140
+ // Example
141
+ throw new errors.ConnectionError (' database connection no longer available' , err);
142
+ ```
143
+
144
+ ---------------------------------------
145
+
116
146
<a name =" authrequired " />
117
147
### AuthenticationRequiredError
118
148
0 commit comments