Sha256: d7114d419316cc925919df05faf0dc6ad885e6fd5d19e490f46c73f2d3debb87

Contents?: true

Size: 883 Bytes

Versions: 15

Compression:

Stored size: 883 Bytes

Contents

module Bolt
  class Node
    class BaseError < Bolt::Error
      attr_reader :issue_code

      def initialize(message, issue_code)
        super(message, kind, nil, issue_code)
      end

      def kind
        'puppetlabs.tasks/node-error'
      end
    end

    class ConnectError < BaseError
      def kind
        'puppetlabs.tasks/connect-error'
      end
    end

    class EscalateError < BaseError
      def kind
        'puppetlabs.tasks/escalate-error'
      end
    end

    class FileError < BaseError
      def kind
        'puppetlabs.tasks/task_file_error'
      end
    end

    class EnvironmentVarError < BaseError
      def initialize(var, val)
        message = "Could not set environment variable '#{var}' to '#{val}'"
        super(message, 'ENVVAR_ERROR')
      end

      def kind
        'puppetlabs.tasks/environment-var-error'
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bolt-0.17.2 lib/bolt/node/errors.rb
bolt-0.17.1 lib/bolt/node/errors.rb
bolt-0.17.0 lib/bolt/node/errors.rb
bolt-0.16.4 lib/bolt/node/errors.rb
bolt-0.16.3 lib/bolt/node/errors.rb
bolt-0.16.2 lib/bolt/node/errors.rb
bolt-0.16.1 lib/bolt/node/errors.rb
bolt-0.16.0 lib/bolt/node/errors.rb
bolt-0.15.0 lib/bolt/node/errors.rb
bolt-0.14.0 lib/bolt/node/errors.rb
bolt-0.13.0 lib/bolt/node/errors.rb
bolt-0.12.0 lib/bolt/node/errors.rb
bolt-0.11.0 lib/bolt/node/errors.rb
bolt-0.10.0 lib/bolt/node/errors.rb
bolt-0.9.0 lib/bolt/node/errors.rb