[PATCH conductor 4/4] Log any errors encountered during image import
Matt Wagner
matt.wagner at redhat.com
Fri Dec 9 21:31:55 UTC 2011
---
src/app/controllers/images_controller.rb | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index 9ba9d02..5899c07 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -79,8 +79,9 @@ class ImagesController < ApplicationController
begin
image = Image.import(provider, params[:image_id])
flash[:success] = t("images.import.image_imported")
- redirect_to image_url(image) and return
- rescue
+ redirect_to image_url(image.id) and return
+ rescue Exception => e
+ logger.error "Caught exception importing image: #{e.message}"
flash[:error] = t("images.import.image_not_imported")
redirect_to new_image_url(:tab => 'import')
end
--
1.7.6.4
More information about the aeolus-devel
mailing list