Sha256: 78ab422416f2132b58692c098e04146693cb066d7cc2d5f87cbd0b58adfc5718

Contents?: true

Size: 512 Bytes

Versions: 17

Compression:

Stored size: 512 Bytes

Contents

module Bibliothecary
  class RemoteParsingError < StandardError
    attr_accessor :code
    def initialize(msg, code)
      @code = code
      super(msg)
    end
  end

  class FileParsingError < StandardError
    attr_accessor :filename, :location
    def initialize(msg, filename, location=nil)
      @filename = filename
      @location = location # source code location of the error, e.g. "lib/hi.rb:34"
      msg = "#{filename}: #{msg}" unless msg.include?(filename)
      super("#{msg}")
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
bibliothecary-12.0.0 lib/bibliothecary/exceptions.rb
bibliothecary-11.0.1 lib/bibliothecary/exceptions.rb
bibliothecary-11.0.0 lib/bibliothecary/exceptions.rb
bibliothecary-10.2.4 lib/bibliothecary/exceptions.rb
bibliothecary-10.2.3 lib/bibliothecary/exceptions.rb
bibliothecary-10.2.2 lib/bibliothecary/exceptions.rb
bibliothecary-10.2.0 lib/bibliothecary/exceptions.rb
bibliothecary-10.1.0 lib/bibliothecary/exceptions.rb
bibliothecary-10.0.0 lib/bibliothecary/exceptions.rb
bibliothecary-9.1.0 lib/bibliothecary/exceptions.rb
bibliothecary-9.0.0 lib/bibliothecary/exceptions.rb
bibliothecary-8.8.1 lib/bibliothecary/exceptions.rb
bibliothecary-8.7.7 lib/bibliothecary/exceptions.rb
bibliothecary-8.7.6 lib/bibliothecary/exceptions.rb
bibliothecary-8.7.5 lib/bibliothecary/exceptions.rb
bibliothecary-8.7.4 lib/bibliothecary/exceptions.rb
bibliothecary-8.7.3 lib/bibliothecary/exceptions.rb