Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1256710A44 for ; Thu, 20 Mar 2014 14:42:32 +0000 (UTC) Received: (qmail 48742 invoked by uid 500); 20 Mar 2014 14:42:31 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 48704 invoked by uid 500); 20 Mar 2014 14:42:30 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 48693 invoked by uid 99); 20 Mar 2014 14:42:28 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Mar 2014 14:42:28 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id D5F151D553D; Thu, 20 Mar 2014 14:42:24 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7437435085099588319==" MIME-Version: 1.0 Subject: Re: Review Request 19460: Check for returned null, throw exception rather than continue. From: "Alex Hitchins" To: "cloudstack" , "Chris Suich" , "Alex Hitchins" Date: Thu, 20 Mar 2014 14:42:24 -0000 Message-ID: <20140320144224.6335.898@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Alex Hitchins" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/19460/ X-Sender: "Alex Hitchins" References: <20140320120059.27584.99872@reviews.apache.org> In-Reply-To: <20140320120059.27584.99872@reviews.apache.org> Reply-To: "Alex Hitchins" X-ReviewRequest-Repository: cloudstack-git --===============7437435085099588319== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19460/ ----------------------------------------------------------- (Updated March 20, 2014, 2:42 p.m.) Review request for cloudstack. Changes ------- Amended patch to throw exception inside takeSnapshot method. Repository: cloudstack-git Description ------- https://issues.apache.org/jira/browse/CLOUDSTACK-5825 I've added a check for null returned. Previously it would return even though there were errors. If null is returned, the takeSnapshot raised and caught an exception. I check for null and if received throw a new exception rather than continue the flow. Diffs (updated) ----- engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java 68e5a56 Diff: https://reviews.apache.org/r/19460/diff/ Testing ------- Compiled and deployed on a new test system, completed steps and snapshots created successfully. I could not re-create a snapshot error, however normal operation is as expected. It's better it throws an exception rather than continue to log it's successful when it's not. Thanks, Alex Hitchins --===============7437435085099588319==--