You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2018. It is now read-only.
LevelUP, AbstractLevelDOWN and LevelDOWN do a lot of argument sanity checking to make sure you get a sensible error in the right way if you do something wrong. Sublevel now doesn't pass everything on early enough to return the correct error types.
I have this in an the tests for level-ttl which is failing:
t.throws(db.put.bind(db),{name: 'WriteError',message: 'put() requires key and value arguments'})t.throws(db.del.bind(db),{name: 'WriteError',message: 'del() requires a key argument'})
I now get an uncaughtException for this because it bubbles up through EventEmitter rather than being thrown straight from the callsite:
Error: value cannot be `null` or `undefined`
at Object.apply (/home/rvagg/git/level-sublevel/nut.js:73:23)
Basically, sublevel is now returning faux-levelup that doesn't behave the same as levelup. I don't really have a suggestion for the best way forward except that perhaps we need ab AbstractLevelUP just for this!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
LevelUP, AbstractLevelDOWN and LevelDOWN do a lot of argument sanity checking to make sure you get a sensible error in the right way if you do something wrong. Sublevel now doesn't pass everything on early enough to return the correct error types.
I have this in an the tests for level-ttl which is failing:
I now get an uncaughtException for this because it bubbles up through
EventEmitter
rather than being thrown straight from the callsite:Basically, sublevel is now returning faux-levelup that doesn't behave the same as levelup. I don't really have a suggestion for the best way forward except that perhaps we need ab AbstractLevelUP just for this!
The text was updated successfully, but these errors were encountered: