Giter VIP home page Giter VIP logo

Comments (7)

garak avatar garak commented on June 25, 2024 1

I'd rather avoid adding a new dependency.
Let's go with the new event.

from vichuploaderbundle.

garak avatar garak commented on June 25, 2024

You can easily add a listener for the exception and perform whatever you want (logging, etc.)

from vichuploaderbundle.

tarjei avatar tarjei commented on June 25, 2024

@garak how? It seems to me it is just swallowed... :)

from vichuploaderbundle.

garak avatar garak commented on June 25, 2024

Sorry, I misread, you're right.
I think the method should throw the same CannotWriteFileException thrown by the doUpload method.
By the way, the previous exception should be passed.

from vichuploaderbundle.

tarjei avatar tarjei commented on June 25, 2024

@garak no problem :) This would require a try catch in UploadHandler wouldn't it? So that the exception is caught there and an event emitted? If the exception is thrown all the way then that would be a BC break - no?

from vichuploaderbundle.

garak avatar garak commented on June 25, 2024

On second thought, it's better to keep it like it is now.
The handler expects an exception for the upload and doesn't expect it from the remove.

Maybe you can exploit a combination of pre-remove and post-remove events to reach your goal.
Otherwise, redefining your own storage is always a possibility.

from vichuploaderbundle.

tarjei avatar tarjei commented on June 25, 2024

I would like to politely disagree. Debugging config errors etc in a storage handler is impossible the way it is setup now with silent fail.

The simplest solution would be a PR where the StorageHandlers get a logger and log each execption. This surfaces the error but does not change the overall behavior of the system. IMHO the other option is to let the UploadHandler catch the exception and emit an event.

from vichuploaderbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.