File: errors.rb

package info (click to toggle)
ruby-buff-ignore 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 164 kB
  • sloc: ruby: 183; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Buff::Ignore
  # @abstract Exceptions from Buff::Ignore
  class BuffIgnoreError < StandardError; end

  # Raised when an ignore file cannot be found
  class IgnoreFileNotFound < BuffIgnoreError
    # @param [String] path
    #   the path where the ignore file was not found
    def initialize(path)
      @path = path
    end

    # @return [String]
    def to_s
      "No ignore file found at '#{File.expand_path(@path)}'!"
    rescue
      "No ignore file found at '#{@path}'!"
    end
  end
end