Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added exception checking in Image.resize() #41

Merged
merged 3 commits into from Aug 20, 2012
Merged

Conversation

@pflorczyk
Copy link
Contributor

@pflorczyk pflorczyk commented Aug 20, 2012

library.MagickResizeImage() in Image.resize() could fail silently returning unmodified image.
Now it properly raises exception.

@travisbot
Copy link

@travisbot travisbot commented Aug 20, 2012

This pull request passes (merged d905da9 into c7a3426).

@dahlia
Copy link
Collaborator

@dahlia dahlia commented Aug 20, 2012

What does it return? It should return nothing as I think.

library.MagickResizeImage(self.wand, width, height, filter, blur)
r = library.MagickResizeImage(self.wand, width, height, filter, blur)
self.raise_exception()
return r

This comment has been minimized.

@dahlia

dahlia Aug 20, 2012
Collaborator

It would be changed like:

if not r:
    self.raise_exception()

This comment has been minimized.

@pflorczyk

pflorczyk Aug 20, 2012
Author Contributor

You are rigth, my mistake. Don't know why/how but in my previous tests it returned unmodified Image. I was only able to trigger exception by calling self.raise_exception() unconditionally (probably fault of mess in my testing env). Now it works as expected :)

@travisbot
Copy link

@travisbot travisbot commented Aug 20, 2012

This pull request passes (merged e9467ea into c7a3426).

@travisbot
Copy link

@travisbot travisbot commented Aug 20, 2012

This pull request passes (merged cff8ba9 into c7a3426).

dahlia added a commit that referenced this pull request Aug 20, 2012
Added exception checking in Image.resize()
@dahlia dahlia merged commit 973af66 into emcconville:master Aug 20, 2012
1 check passed
1 check passed
default The Travis build passed
Details
dahlia added a commit that referenced this pull request Aug 20, 2012
@dahlia
Copy link
Collaborator

@dahlia dahlia commented Aug 20, 2012

@pflorczyk Although it’s just off-topic, the author email of your commits doesn’t seem associated to your GitHub account. If you associate your email to the GitHub account, this contributor list will show you as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants