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.1.59 lib/mutx/error/errors.rb
mutx-0.1.58 lib/mutx/error/errors.rb
mutx-0.1.57 lib/mutx/error/errors.rb
mutx-0.1.56 lib/mutx/error/errors.rb
mutx-0.1.55 lib/mutx/error/errors.rb
mutx-0.1.54 lib/mutx/error/errors.rb
mutx-0.1.53 lib/mutx/error/errors.rb
mutx-0.1.52 lib/mutx/error/errors.rb
mutx-0.1.51 lib/mutx/error/errors.rb
mutx-0.1.50 lib/mutx/error/errors.rb
mutx-0.1.49 lib/mutx/error/errors.rb
mutx-0.1.48 lib/mutx/error/errors.rb
mutx-0.1.47 lib/mutx/error/errors.rb
mutx-0.1.46 lib/mutx/error/errors.rb
mutx-0.1.45 lib/mutx/error/errors.rb
mutx-0.1.44 lib/mutx/error/errors.rb
mutx-0.1.43 lib/mutx/error/errors.rb
mutx-0.1.42 lib/mutx/error/errors.rb
mutx-0.1.40 lib/mutx/error/errors.rb
mutx-0.1.39 lib/mutx/error/errors.rb