@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.
@@ -36,6 +36,16 @@ class _Error extends Error {
36
36
  return err._type === '_' && typeof err.code === 'number'
37
37
  }
38
38
 
39
+ /**
40
+ *
41
+ * @param {string} message
42
+ * @param {number} time ms
43
+ * @returns {_Error}
44
+ */
45
+ static timeout (message, time) {
46
+ return new _Error(`Timeout ${time}ms: ${message}`, 504)
47
+ }
48
+
39
49
  /**
40
50
  * "412 Precondition Failed" indicates that one or more conditions
41
51
  * given in the request header fields evaluated to false when tested on the server.
@@ -48,8 +58,8 @@ class _Error extends Error {
48
58
  * @param {string} message
49
59
  * @returns {_Error}
50
60
  */
51
- static PreconditionFailed (message) {
52
- return new _Error(`Not Found: ${message}`, 412)
61
+ static preconditionFailed (message) {
62
+ return new _Error(`Not Matched: ${message}`, 412)
53
63
  }
54
64
 
55
65
  /**