Skip to content

Commit 2e2e0f9

Browse files
committedMay 19, 2015
Update README.md
1 parent d369e02 commit 2e2e0f9

File tree

1 file changed

+133
-0
lines changed

1 file changed

+133
-0
lines changed
 

‎README.md

+133
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,139 @@ throw new errors.ConnectionError('database connection no longer available', err)
162162

163163
---------------------------------------
164164

165+
<a name="data" />
166+
### DataError
167+
168+
Applicable when an error occurs on or with an external data source.
169+
170+
new DataError(message[, inner_error])
171+
172+
__Arguments__
173+
174+
* `message` - any message
175+
* `inner_error` - the Error instance that caused the current error. Stack trace will be appended.
176+
177+
```js
178+
// Example
179+
throw new errors.DataError('Too many rows returned from database', err);
180+
```
181+
182+
---------------------------------------
183+
184+
<a name="memcached" />
185+
### MemcachedError
186+
187+
Applicable when an error occurs while using memcached.
188+
189+
new MemcachedError(message[, inner_error])
190+
191+
__Arguments__
192+
193+
* `message` - any message
194+
* `inner_error` - the Error instance that caused the current error. Stack trace will be appended.
195+
196+
```js
197+
// Example
198+
throw new errors.MemcachedError('Expected value not found', err);
199+
```
200+
201+
---------------------------------------
202+
203+
<a name="mongodb" />
204+
### MongoDBError
205+
206+
Applicable when an error occurs while using MongoDB.
207+
208+
new MongoDBError(message[, inner_error])
209+
210+
__Arguments__
211+
212+
* `message` - any message
213+
* `inner_error` - the Error instance that caused the current error. Stack trace will be appended.
214+
215+
```js
216+
// Example
217+
throw new errors.MongoDBError('Retrieved value not in expected format', err);
218+
```
219+
220+
---------------------------------------
221+
222+
<a name="redis" />
223+
### RedisError
224+
225+
Applicable when an error occurs while using redis.
226+
227+
new RedisError(message[, inner_error])
228+
229+
__Arguments__
230+
231+
* `message` - any message
232+
* `inner_error` - the Error instance that caused the current error. Stack trace will be appended.
233+
234+
```js
235+
// Example
236+
throw new errors.RedisError('expected value not found in redis', err);
237+
```
238+
239+
---------------------------------------
240+
241+
<a name="rollback" />
242+
### RollbackError
243+
244+
Applicable when a transaction was unexpectedly rolled back.
245+
246+
new RollbackError(message[, inner_error])
247+
248+
__Arguments__
249+
250+
* `message` - any message
251+
* `inner_error` - the Error instance that caused the current error. Stack trace will be appended.
252+
253+
```js
254+
// Example
255+
throw new errors.RollbackError('database transaction was unexpectedly rolled back', err);
256+
```
257+
258+
---------------------------------------
259+
260+
<a name="sql" />
261+
### SQLError
262+
263+
Applicable when an error occurs while using a SQL database.
264+
265+
new SQLError(message[, inner_error])
266+
267+
__Arguments__
268+
269+
* `message` - any message
270+
* `inner_error` - the Error instance that caused the current error. Stack trace will be appended.
271+
272+
```js
273+
// Example
274+
throw new errors.SQLError('foreign key constraint violated', err);
275+
```
276+
277+
---------------------------------------
278+
279+
<a name="transaction" />
280+
### TransactionError
281+
282+
Applicable when an error unexpectedly interrupts a transaction.
283+
284+
new TransactionError(message[, inner_error])
285+
286+
__Arguments__
287+
288+
* `message` - any message
289+
* `inner_error` - the Error instance that caused the current error. Stack trace will be appended.
290+
291+
```js
292+
// Example
293+
throw new errors.TransactionError('transaction already complete', err);
294+
```
295+
296+
---------------------------------------
297+
165298
<a name="error" />
166299
### Error
167300

0 commit comments

Comments
 (0)
Please sign in to comment.