« Previous | Next » 

Revision 39420403

ID394204031522b348782d9f986fd80ed2a4847c42
Parent 6656790a
Child d9f02980

Added by Iustin Pop about 13 years ago

luxi backend: show attribute names in errors

Currently, this backend just gives:

Error: failed to load data. Details:
Node 'node2': Cannot convert value JSNull, error: Unable to read Double

That is because for Luxi we get an array back from the query, as
opposed to RAPI where we get a dict (and thus have the key at
hand). This patch moves the hardcoded 'convert' functions to a
genericConvert, that also takes the attribute name, with the result
that the error message is now:

Error: failed to load data. Details:
Node 'node2', attribute 'mtotal': Cannot convert value 'JSNull', error: Unable to read Double

which is better for debugging.

The patch also adds quotes around the value in the Utils.fromJVal
function.

Signed-off-by: Iustin Pop <>
Reviewed-by: Adeodato Simo <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences