@live-change/dao 0.8.105 → 0.8.107

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.
Files changed (2) hide show
  1. package/lib/SimpleDao.js +5 -2
  2. package/package.json +2 -2
package/lib/SimpleDao.js CHANGED
@@ -30,13 +30,16 @@ class SimpleDao {
30
30
 
31
31
  get(what) {
32
32
  const source = this.defn.values[what[1]]
33
- if(!source) throw new Error(`source ${what[1]} is not defined`)
33
+ if(!source) throw new Error(`source ${what[1]} is not defined while getting ${what}`)
34
34
  return source.get(...(what.slice(2)))
35
35
  }
36
36
 
37
37
  request(what, ...args) {
38
38
  let method = this.defn.methods[what[1]]
39
- if(!method) throw new Error("methodNotFound")
39
+ if(!method) {
40
+ console.log("METHOD", what[1], "not found in", what)
41
+ throw new Error("methodNotFound")
42
+ }
40
43
  let res = method(...(what.slice(2).concat(args)))
41
44
  if(res && res.then) return res
42
45
  return Promise.resolve(res)
package/package.json CHANGED
@@ -35,6 +35,6 @@
35
35
  "scripts": {
36
36
  "test": "NODE_ENV=test tape tests/*"
37
37
  },
38
- "version": "0.8.105",
39
- "gitHead": "bf290febf91c05b8fb1b657b1c0f4861ca2727fc"
38
+ "version": "0.8.107",
39
+ "gitHead": "da00b9062a0238e1497c76009b0bd9e74ff7a376"
40
40
  }