Exception: Keychain::KeychainException

Inherits:
Exception
  • Object
show all
Defined in:
lib/mr_keychain/keychain_exception.rb

Overview

Properly extracts error messages based on error codes.

Instance Method Summary (collapse)

Constructor Details

- (KeychainException) initialize(message_prefix, error_code)

A new instance of KeychainException

Parameters:

  • message_prefix (#to_s)

    an indicator of where the exception originated

  • error_code (Fixnum)

    result code from calling a Sec function



10
11
12
13
# File 'lib/mr_keychain/keychain_exception.rb', line 10

def initialize message_prefix, error_code
  cf_message = SecCopyErrorMessageString( error_code, nil )
  super "#{message_prefix}. #{cf_message}"
end