Sha256: c5ae2ff288cd313f4c2586db8445cd529aa8c44075003d0a991b93b0b22d6bae

Contents?: true

Size: 813 Bytes

Versions: 2

Compression:

Stored size: 813 Bytes

Contents

# frozen_string_literal: true

# PhNoToWord::Error is raised when it's caused by wrong usage of PhNoToWord.
# Those errors have their backtrace suppressed and are nicely shown to the user.
module PhNoToWord
  # Errors that are caused by the developer, like declaring a method which
  # overwrites a PhNoToWord keyword, SHOULD NOT raise a PhNoToWord::Error.
  # This way, we ensure that developer errors are shown with full backtrace.
  module Error
    class Error < StandardError
    end

    # Raised when a command was not found.
    class UndefinedCommandError < Error
    end

    class UnknownArgumentError < Error
    end

    class RequiredArgumentMissingError < ArgumentError
    end

    class MalformattedArgumentError < ArgumentError
    end

    class FileNotExists < ArgumentError
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ph_no_to_word-2.1.0 lib/ph_no_to_word/error.rb
ph_no_to_word-2.0.0 lib/ph_no_to_word/error.rb