Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- LookUp exception accept backend name instead of backend instance to…

… made it serializable
  • Loading branch information...
commit f9eefec7b166b57314b3314bdad69b59fcc8be73 1 parent 8295ad5
Nickolay Platonov authored
View
2  lib/KiokuJS/Backend/Hash.js
@@ -25,7 +25,7 @@ Class('KiokuJS.Backend.Hash', {
if (docs[ id ]) return docs[ id ]
- throw new KiokuJS.Exception.LookUp({ id : id, backend : this })
+ throw new KiokuJS.Exception.LookUp({ id : id, backendName : this.meta.name })
})
var serializer = this.serializer
View
4 lib/KiokuJS/Exception/LookUp.js
@@ -4,7 +4,7 @@ Class('KiokuJS.Exception.LookUp', {
has : {
id : { required : true },
- backend : { required : true },
+ backendName : { required : true },
description : 'Failed lookup attempt'
},
@@ -12,7 +12,7 @@ Class('KiokuJS.Exception.LookUp', {
methods : {
getMesage : function () {
- return 'ID [' + this.id + '] not found in the backend [' + this.backend.meta.name + ']'
+ return 'ID [' + this.id + '] not found in the backend [' + this.backendName + ']'
}
}
})
View
2  lib/KiokuJS/Linker/Expander.js
@@ -35,7 +35,7 @@ Class('KiokuJS.Linker.Expander', {
if (!refNode)
if (reference.type != 'lazy')
- throw new KiokuJS.Exception.LookUp({ message : "Can't find the id [" + refID + "] when expanding nodes" })
+ throw new KiokuJS.Exception.LookUp({ id : refID, backendName : "Expander working set" })
else
return reference
Please sign in to comment.
Something went wrong with that request. Please try again.