lib/clamp/errors.rb in clamp-0.5.1 vs lib/clamp/errors.rb in clamp-0.6.0

- old
+ new

@@ -1,22 +1,25 @@ module Clamp - - class Error < StandardError + class DeclarationError < StandardError + end + + class RuntimeError < StandardError + def initialize(message, command) super(message) @command = command end attr_reader :command end # raise to signal incorrect command usage - class UsageError < Error; end + class UsageError < RuntimeError; end # raise to request usage help - class HelpWanted < Error + class HelpWanted < RuntimeError def initialize(command) super("I need help", command) end