incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik ...@mifo.sk>
Subject Re: [PATCH 1/4] * server/server.rb: load default drive on startup
Date Wed, 08 Jun 2011 15:40:31 GMT
On Jun 8, 2011, at 5:32 PM, lutter@redhat.com wrote:

> From: David Lutterkort <lutter@redhat.com>
> 
> This makes the server fail early if there is a problem with the driver

ACK.

Nice catch! It could be also used for reporting missing driver gems.
Eg. we can wrap it with 'begin..rescue...end' and check for FileNotFound
exception and then report meaningful messages to user about missing gems.

  -- Michal

> 
> Signed-off-by: David Lutterkort <lutter@redhat.com>
> ---
> server/server.rb |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/server/server.rb b/server/server.rb
> index e332679..0cd4945 100644
> --- a/server/server.rb
> +++ b/server/server.rb
> @@ -45,6 +45,8 @@ configure do
>   set :show_exceptions, false
>   set :views, File.dirname(__FILE__) + '/views'
>   set :public, File.dirname(__FILE__) + '/public'
> +  # Try to load the driver on startup to fail early if there are issues
> +  driver
> end
> 
> configure :development do
> -- 
> 1.7.4.4
> 


Mime
View raw message