@creejs/commons-lang 2.1.29 → 2.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,16 @@ class _Error extends Error {
32
32
  return err._type === '_' && typeof err.code === 'number'
33
33
  }
34
34
 
35
+ /**
36
+ *
37
+ * @param {string} message
38
+ * @param {number} time ms
39
+ * @returns {_Error}
40
+ */
41
+ static timeout (message, time) {
42
+ return new _Error(`Timeout ${time}ms: ${message}`, 504)
43
+ }
44
+
35
45
  /**
36
46
  * "412 Precondition Failed" indicates that one or more conditions
37
47
  * given in the request header fields evaluated to false when tested on the server.
@@ -44,8 +54,8 @@ class _Error extends Error {
44
54
  * @param {string} message
45
55
  * @returns {_Error}
46
56
  */
47
- static PreconditionFailed (message) {
48
- return new _Error(`Not Found: ${message}`, 412)
57
+ static preconditionFailed (message) {
58
+ return new _Error(`Not Matched: ${message}`, 412)
49
59
  }
50
60
 
51
61
  /**