trema/paper-house

View on GitHub
lib/paper_house/build_failed.rb

Summary

Maintainability
A
0 mins
Test Coverage
# encoding: utf-8

module PaperHouse
  # Exception raised if a build task fails
  class BuildFailed < ::StandardError
    attr_reader :command
    attr_reader :status

    # @private
    def initialize(command, status)
      @command = command
      @status = status
    end

    # Error message
    def message
      "Command `#{command}' failed with status #{status.exitstatus}"
    end
  end
end