asm89 / twig-cache-extension

The missing cache extension for Twig. Caching template fragments with Twig.
MIT License
388 stars 27 forks source link

Implement custom exceptions, fix some CS #18

Closed stloyd closed 10 years ago

stloyd commented 10 years ago

This is kinda BC break, cause it throws more proper (IMO) exception \InvalidArgumentException instead of \RuntimeException. So if someone had try/catch for the old one, those new will pass, as they are no diffrenent.

stloyd commented 10 years ago

@asm89 ping =)

asm89 commented 10 years ago

@stloyd I'd like to merge this, but I'm pondering as what version it should be released. Since it is a BC break..

stloyd commented 10 years ago

@asm89 You know, we can have BC covered by changing to \RuntimeException as a base one again, but I just don't think this is correct one...

asm89 commented 10 years ago

@stloyd How about this:

The other thing I'm not sure about is overriding the constructor arguments of exception.

stloyd commented 10 years ago

@asm89 Sounds reasonable =) changed the code =)

stloyd commented 10 years ago

@asm89 Ping =)

asm89 commented 10 years ago

@stloyd Thank you for this PR. :) I'm still wondering if there's a better name for BaseException, but I've merged it for now.