Sha256: 54118d759b797c9abb29ebee179ca9e24b1b7b51078bb0d85074950d3a84ff9f

Contents?: true

Size: 300 Bytes

Versions: 9

Compression:

Stored size: 300 Bytes

Contents

module JDC 
  class UserFriendlyError < RuntimeError
    def initialize(msg)
      @message = msg
    end

    def to_s
      @message
    end
  end

  class UserError < UserFriendlyError; end

  class NotAuthorized < UserError
    def initialize
      @message = "Not authorized."
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jdc-0.2.7 lib/jdc/errors.rb
jdc-0.2.5 lib/jdc/errors.rb
jdc-0.2.4 lib/jdc/errors.rb
jdc-0.2.3 lib/jdc/errors.rb
jdc-0.2.2 lib/jdc/errors.rb
jdc-0.2.3.pre lib/jdc/errors.rb
jdc-0.2.2.pre lib/jdc/errors.rb
jdc-0.2.1.pre lib/jdc/errors.rb
jdc-0.2.0 lib/jdc/errors.rb