Sha256: f08c4339588072606c5220e2918be5b1f09131166f656eb889eb3a4e93b34e48

Contents?: true

Size: 364 Bytes

Versions: 9

Compression:

Stored size: 364 Bytes

Contents

module Methadone
  # Standard exception you can throw to exit with a given 
  # status code. Prefer Methadone::Main#exit_now! over this
  class Error < StandardError
    attr_reader :exit_code
    # Create an Error with the given status code and message
    def initialize(exit_code,message=nil)
      super(message)
      @exit_code = exit_code
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
methadone-0.5.1 lib/methadone/error.rb
methadone-0.4.1 lib/methadone/error.rb
methadone-0.4.0 lib/methadone/error.rb
methadone-0.3.4 lib/methadone/error.rb
methadone-0.3.3 lib/methadone/error.rb
methadone-0.3.2 lib/methadone/error.rb
methadone-0.3.1 lib/methadone/error.rb
methadone-0.3.0 lib/methadone/error.rb
methadone-0.2.0 lib/methadone/error.rb