Sha256: faed3fcc87d98e82595bf54721533f6b23dafcbd68ad5c364c519fde4c48cce8

Contents?: true

Size: 429 Bytes

Versions: 17

Compression:

Stored size: 429 Bytes

Contents

module Moneta
  module Api
    class RuntimeException < Exception
      attr_accessor :code, :detail

      def inspect
        error = [ "#{ code }: #{ message }" ]
        error += detail.collect { |key, value| "#{ key }: #{ Array(value).join($/) }" }
        error.join($/)
      end

      def to_hash
        {
          code: code,
          message: message,
          detail: detail
        }
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
moneta-api-2.1.0 lib/moneta/api/runtime_exception.rb
moneta-api-2.0.0 lib/moneta/api/runtime_exception.rb
moneta-api-2.0.0.rc2 lib/moneta/api/runtime_exception.rb
moneta-api-2.0.0.rc1 lib/moneta/api/runtime_exception.rb
moneta-api-1.13.0 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.8 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.7 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.6 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.5 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.4 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.3 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.2 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.1 lib/moneta/api/runtime_exception.rb
moneta-api-1.12.0 lib/moneta/api/runtime_exception.rb
moneta-api-1.11.0 lib/moneta/api/runtime_exception.rb
moneta-api-1.10.0 lib/moneta/api/runtime_exception.rb
moneta-api-1.9.0 lib/moneta/api/runtime_exception.rb