Sha256: 0df48a88c226db7b8dbe8cd82cf29183bd630bcc75b457538b548dca175dce30

Contents?: true

Size: 1.31 KB

Versions: 36

Compression:

Stored size: 1.31 KB

Contents

module CloudCrowd
  
  # Base Error class which all custom CloudCrowd exceptions inherit from.
  # Rescuing CloudCrowd::Error (or RuntimeError) will get all custom exceptions.
  # If your cluster is correctly configured, you should never expect to see any
  # of these.
  class Error < RuntimeError
    
    # ActionNotFound is raised when a job is created for an action that doesn't 
    # exist.
    class ActionNotFound < Error
    end
  
    # StorageNotFound is raised when config.yml specifies a storage back-end that
    # doesn't exist.
    class StorageNotFound < Error
    end
    
    # If the AssetStore can't write to its scratch directory.
    class StorageNotWritable < Error
    end
    
    # StatusUnspecified is raised when a WorkUnit returns without a valid
    # status code.
    class StatusUnspecified < Error
    end
    
    # MissingConfiguration is raised when we're trying to run a method that
    # needs configuration not present in config.yml.
    class MissingConfiguration < Error
    end
    
    # CommandFailed is raised when an action shells out, and the external 
    # command returns a non-zero exit code.
    class CommandFailed < Error
      attr_reader :exit_code
      
      def initialize(message, exit_code)
        super(message)
        @exit_code = exit_code
      end
    end
    
  end
  
end

Version data entries

36 entries across 36 versions & 3 rubygems

Version Path
cloud-crowd-0.7.6 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.5 lib/cloud_crowd/exceptions.rb
documentcloud-cloud-crowd-0.2.1 lib/cloud_crowd/exceptions.rb
documentcloud-cloud-crowd-0.2.2 lib/cloud_crowd/exceptions.rb
documentcloud-cloud-crowd-0.2.3 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.3 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.2 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.2.beta lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.2.pre3 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.2.pre2 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.2.pre lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.1 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.0 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.7.0.pre lib/cloud_crowd/exceptions.rb
cloud-crowd-0.6.2 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.6.1 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.6.0 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.5.2 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.5.0 lib/cloud_crowd/exceptions.rb
cloud-crowd-0.4.1 lib/cloud_crowd/exceptions.rb