media-bundle icon indicating copy to clipboard operation
media-bundle copied to clipboard

Improve error handling

Open rmsint opened this issue 11 years ago • 1 comments

Examples:

  • the upload service uses a media root path. If it does not exist the upload of an image will fail because the parent can not be found.
  • the cmf_create.persistence.phpcr.image.basepath and cmf_media.persistence.phpcr.media_basepath can mismatch, we should check that these are indepent and have no relation. However media-bundle services that get different root paths injected can also cause an issue. See https://github.com/symfony-cmf/symfony-cmf/issues/186

When and where to throw an error to notify the developer of this?

Maybe validate the configuration, so the developer directly knows if the configuration is not correct. Or do some extra checks in the constructor of some services?

rmsint avatar Feb 25 '14 08:02 rmsint

not sure if there can not be use cases where people have different default paths, and extra services - so simply considering this an error sounds not good.

dbu avatar Apr 04 '14 15:04 dbu