Sha256: 4114d3f611bf47a125274df37f4740dc10ef132dd36e64d8637ee05dd5865234

Contents?: true

Size: 838 Bytes

Versions: 10

Compression:

Stored size: 838 Bytes

Contents

module Cfer::Util
  require 'highline/import'
  class CferError < StandardError
  end

  class CferValidationError < CferError
    attr_reader :errors
    def initialize(errors)
      @errors = errors
      super(errors)
    end
  end

  class StackExistsError < CferError
  end

  class StackDoesNotExistError < CferError
  end

  class FileDoesNotExistError < CferError
  end

  class TemplateError < CferError
    attr_reader :template_backtrace

    def initialize(template_backtrace)
      @template_backtrace = template_backtrace
      super
    end
  end

  def self.bug_report(e)
    gather_report e
    transmit_report if agree('Would you like to send this information in a bug report? (type yes/no)')
  end

  private
  def self.gather_report(e)
    puts e
  end

  def self.transmit_report
    puts "Sending report."
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cfer-1.0.0 lib/cfer/util/error.rb
cfer-0.8.0 lib/cfer/util/error.rb
cfer-0.7.0 lib/cfer/util/error.rb
cfer-0.6.2 lib/cfer/util/error.rb
cfer-0.6.1 lib/cfer/util/error.rb
cfer-0.6.0 lib/cfer/util/error.rb
cfer-0.5.0 lib/cfer/util/error.rb
cfer-0.5.0.pre.rc4 lib/cfer/util/error.rb
cfer-0.5.0.pre.rc3 lib/cfer/util/error.rb
cfer-0.5.0.pre.rc2 lib/cfer/util/error.rb