scalapenos / stamina

Schema evolution for akka-persistence

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

readPersisted can use some more error handling..

RayRoestenburg opened this issue · comments

To indicate the reason why it could not decode.
(chance is you will get a NumberFormatException, which doesn't explain much, maybe better to wrap in your own exception)
It's nicer if you can give feedback (could not read version as an int, etc)
Also there is the possibility that key ends up an empty string, I don't think you should allow that (at least non empty)

Also DefaultEncoding should be called DefaultCodec, since it encodes and decodes.

Good idea, although I'm not sure into how much detail I should go or who would ever read those error messages unless they are trying to read stuff that other people wrote with completely different Serializers... but good point nonetheless.

Not allowing empty Strings sounds like a good idea. Thanks!

I like the word Codec so I think I'll indeed use that ;)

As you know, good naming suggestions from yours truly are very few and far
in between ;-)
On Sun 8 Feb 2015 at 18:43 Age Mooij notifications@github.com wrote:

Good idea, although I'm not sure into how much detail I should go or who
would ever read those error messages unless they are trying to read stuff
that other people wrote with completely different Serializers... but good
point nonetheless.

Not allowing empty Strings sounds like a good idea. Thanks!

I like the word Codec so I think I'll indeed use that ;)


Reply to this email directly or view it on GitHub
#3 (comment).

Closing

Damn, wrong button pressed. Anyway, point taken about better error handling.