KeyValueStore icon indicating copy to clipboard operation
KeyValueStore copied to clipboard

Fix DBALStorage to not ignore exceptions

Open enumag opened this issue 10 years ago • 10 comments

Is there some reason to catch all exceptions? If there is a problem with the storage I want to know about it, not silently ignore it.

enumag avatar Jan 04 '16 21:01 enumag

Requires testing. /cc @EmanueleMinotto

Ocramius avatar Jan 04 '16 21:01 Ocramius

@enumag you're right, exceptions should be thrown there as well, anyway without tests a merge won't be safe (I'll cover them asap if you can't).

EmanueleMinotto avatar Jan 04 '16 22:01 EmanueleMinotto

@EmanueleMinotto I don't have time for that now... Also I've noticed that the DBALStorage completely ignores the $storageName argument. Maybe it should be used as a prefix for the key?

Anyway I've duplicated the class to my project for the time being (without the try-catch blocks).

enumag avatar Jan 04 '16 22:01 enumag

@enumag yes, I'm reviewing everything in these days

EmanueleMinotto avatar Jan 04 '16 22:01 EmanueleMinotto

@EmanueleMinotto I'm also wondering if there should be some sort of support for transactions (when inserting/updateing multiple values). Not sure if that's relevant to other storages than sql database.

enumag avatar Jan 04 '16 22:01 enumag

@enumag it would be great if you could open an issue for every thought :) because $storageName seems a bug, I'm still not sure about transactions and no one of these is related to DBALStorage exceptions

EmanueleMinotto avatar Jan 04 '16 23:01 EmanueleMinotto

Ok, I'll open separate issues. :-)

enumag avatar Jan 04 '16 23:01 enumag

All done. You can delete the unrelated commens from this issue if you want.

enumag avatar Jan 04 '16 23:01 enumag

@EmanueleMinotto Any progress?

enumag avatar Mar 15 '16 21:03 enumag

@enumag not yet, I'm busy with some things + work, I'll take a look asap

EmanueleMinotto avatar Mar 15 '16 22:03 EmanueleMinotto