Sha256: b15cab21127778564492126bcc6fe4bc37fc513eaffdc348fc4ecd26b3c1afd5

Contents?: true

Size: 1.34 KB

Versions: 73

Compression:

Stored size: 1.34 KB

Contents

# encoding: utf-8
module Mutx
  module Error
    # Raised when there is an error related to Tasks.
    class Task < StandardError
      attr_reader :task_name

      def initialize(task_name, message=nil)
        @task_name = task_name
        message = message
        super(message)
      end
    end

    # Raised when there is an error related to Results.
    class Result < StandardError
      attr_reader :id

      def initialize(id, message=nil)
        @id = id
        message = message
        super(message)
      end

    end

    class ExecutionTimeoutError < StandardError
      attr_reader :id, :message

      def initialize(id, message=nil)
        @id = id
        @message = message
        super message

      end
    end

    class MutxFile < StandardError
      def initialize file_path
        super("Could not find '#{file_path} file" )
      end
    end

    class MutxDir < StandardError
      def initialize file_path
        super("Could not find '#{file_path}' dir")
      end
    end

    class TaskNotFound < StandardError
      def initialize(message=nil)
        message ="Task not foun" if message.nil?
        super(message)
      end
    end

    # Raised when there is an error related to Help.
    class Help < StandardError
       def initialize(message=nil)
        message = message
        super(message)
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
mutx-0.2.9 lib/mutx/error/errors.rb
mutx-0.2.8 lib/mutx/error/errors.rb
mutx-0.2.7 lib/mutx/error/errors.rb
mutx-0.2.6 lib/mutx/error/errors.rb
mutx-0.2.5 lib/mutx/error/errors.rb
mutx-0.2.4 lib/mutx/error/errors.rb
mutx-0.2.3 lib/mutx/error/errors.rb
mutx-0.2.2 lib/mutx/error/errors.rb
mutx-0.2.1 lib/mutx/error/errors.rb
mutx-0.2.0 lib/mutx/error/errors.rb
mutx-0.1.69 lib/mutx/error/errors.rb
mutx-0.1.68 lib/mutx/error/errors.rb
mutx-0.1.67 lib/mutx/error/errors.rb
mutx-0.1.66 lib/mutx/error/errors.rb
mutx-0.1.65 lib/mutx/error/errors.rb
mutx-0.1.64 lib/mutx/error/errors.rb
mutx-0.1.63 lib/mutx/error/errors.rb
mutx-0.1.62 lib/mutx/error/errors.rb
mutx-0.1.61 lib/mutx/error/errors.rb
mutx-0.1.60 lib/mutx/error/errors.rb