Exception: Keycloak::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/libkeycloak.rb

Instance Method Summary collapse

Constructor Details

#initialize(err, str) ⇒ Error

Returns a new instance of Error.



336
337
338
339
340
341
# File 'lib/libkeycloak.rb', line 336

def initialize(err, str)
  str = FFI::MemoryPointer.new(:string, 1024) # TODO: ERR_MAX macro
  Keycloak_FFI.keycloak_errmsg(err, str)
  super("Error " + err[:errcode].to_s + ": " + str.read_string)
  @ptr = err
end

Instance Method Details

#errcodeObject



343
344
345
# File 'lib/libkeycloak.rb', line 343

def errcode
  return @ptr[:errcode]
end