Revision 311eefcb

View differences:

share/hooks/image.rb
36 36
end
37 37

  
38 38

  
39
client = Client.new()
39
begin
40
    client = Client.new()
41
rescue Exception => e
42
    puts "Error: #{e}"
43
    exit(-1)
44
end
45

  
40 46
img_repo = ImageRepository.new
41 47

  
42 48
vm = VirtualMachine.new(
src/authm_mad/one_auth_mad.rb
84 84
    end
85 85
    
86 86
    def action_authorize(request_id, user_id, *tokens)
87
        auth=@permissions.auth(user_id, tokens.flatten)
87
        begin
88
            auth=@permissions.auth(user_id, tokens.flatten)
89
        rescue Exception => e
90
            auth="Error: #{e}"
91
        end
92
        
88 93
        if auth==true
89 94
            send_message('AUTHORIZE', RESULT[:success],
90 95
                request_id, 'success')
......
95 100
    end
96 101
end
97 102

  
103
begin
104
    am=AuthorizationManager.new
105
rescue Exception => e
106
    puts "Error: #{e}"
107
    exit(-1)
108
end
98 109

  
99
am=AuthorizationManager.new
100 110
am.start_driver
101 111

  
src/authm_mad/oneauth
91 91
    when 'set'
92 92
        check_parameters("quota set", 3)
93 93
        Dir.chdir VAR_LOCATION
94
        add_quota(*ARGV[1..3])
94
        
95
        begin
96
            add_quota(*ARGV[1..3])
97
        rescue Exception => e
98
            puts "Error starting server: #{e}"
99
            exit(-1)
100
        end
95 101
    else
96 102
        #default
97 103
    end
src/cloud/ec2/lib/econe-server.rb
45 45

  
46 46
include OpenNebula
47 47

  
48
$econe_server = EC2QueryServer.new(CONFIGURATION_FILE,
49
    TEMPLATE_LOCATION, VIEWS_LOCATION)
48
begin
49
    $econe_server = EC2QueryServer.new(CONFIGURATION_FILE,
50
        TEMPLATE_LOCATION, VIEWS_LOCATION)
51
rescue Exception => e
52
    puts "Error starting server: #{e}"
53
    exit(-1)
54
end
50 55

  
51 56
if CloudServer.is_port_open?($econe_server.config[:server], 
52 57
                             $econe_server.config[:port])
src/cloud/occi/lib/occi-server.rb
49 49

  
50 50
include OpenNebula
51 51

  
52
$occi_server = OCCIServer.new(CONFIGURATION_FILE, TEMPLATE_LOCATION)
52
begin
53
    $occi_server = OCCIServer.new(CONFIGURATION_FILE, TEMPLATE_LOCATION)
54
rescue Exception => e
55
    puts "Error starting server: #{e}"
56
    exit(-1)
57
end
53 58

  
54 59
if CloudServer.is_port_open?($occi_server.config[:server], 
55 60
                             $occi_server.config[:port])

Also available in: Unified diff