Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try catch error in 'get' #37

Closed
wants to merge 8 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@dead-horse
Copy link
Contributor

dead-horse commented Dec 27, 2011

When I use RedisStore.get, if some error throw in the callback and forget to catch it, it will catch by ‘RedisStore.get’ and do callback(err) again!

In the old test.js, when test RedisStore.length, it will throw an error [TypeError: Object # has no method 'length'], but it will catch in RedisStore.get. I think the try catch in function get should only catch JSON.parse error.

Also I update the test.js ,remove test of RedisStore.length and RedisStore.clear.

@tj

This comment has been minimized.

Copy link
Owner

tj commented Aug 28, 2012

yikes yeah this is really noisy, and you don't follow the existing styling at all (return fn&&fn(err); etc) also what is multi_redis?

@dead-horse

This comment has been minimized.

Copy link
Contributor Author

dead-horse commented Sep 16, 2012

Sorry. I used to modified this module to suits my own redis module multi_redis, so It's such a noisy. I merged the newest version and fix the code style.

@dylanmcd

This comment has been minimized.

Copy link

dylanmcd commented Oct 13, 2012

+1, I'll volunteer to rewrite if the noise is still holding you back from merging

@fengmk2

This comment has been minimized.

Copy link

fengmk2 commented Oct 14, 2012

+1

@tj

This comment has been minimized.

Copy link
Owner

tj commented Oct 17, 2012

yeah ideally we squash so there's not 6 commits

@dead-horse

This comment has been minimized.

Copy link
Contributor Author

dead-horse commented Oct 17, 2012

move this to #65

@dead-horse dead-horse closed this Oct 17, 2012

@davisford davisford referenced this pull request Jan 2, 2013

Closed

RedisStore issues #337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
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.