This repository was archived by the owner on Feb 4, 2022. It is now read-only.
File tree 1 file changed +20
-4
lines changed
1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ util.inherits(MongoNetworkError, MongoError);
66
66
* @class
67
67
* @param {Error|string|object } message The error message
68
68
* @property {string } message The error message
69
- * @return {MongoParseError } A MongoNetworkError instance
69
+ * @return {MongoParseError } A MongoParseError instance
70
70
* @extends {MongoError }
71
71
*/
72
72
const MongoParseError = function ( message ) {
@@ -75,8 +75,24 @@ const MongoParseError = function(message) {
75
75
} ;
76
76
util . inherits ( MongoParseError , MongoError ) ;
77
77
78
+ /**
79
+ * An error signifying a timeout event
80
+ *
81
+ * @class
82
+ * @param {Error|string|object } message The error message
83
+ * @property {string } message The error message
84
+ * @return {MongoTimeoutError } A MongoTimeoutError instance
85
+ * @extends {MongoError }
86
+ */
87
+ const MongoTimeoutError = function ( message ) {
88
+ MongoError . call ( this , message ) ;
89
+ this . name = 'MongoTimeoutError' ;
90
+ } ;
91
+ util . inherits ( MongoTimeoutError , MongoError ) ;
92
+
78
93
module . exports = {
79
- MongoError : MongoError ,
80
- MongoNetworkError : MongoNetworkError ,
81
- MongoParseError : MongoParseError
94
+ MongoError,
95
+ MongoNetworkError,
96
+ MongoParseError,
97
+ MongoTimeoutError
82
98
} ;
You can’t perform that action at this time.
0 commit comments