class Minidoc::DuplicateKey

Constants

DUPLICATE_KEY_ERROR_CODE

Public Class Methods

duplicate_key_exception(exception) click to toggle source
# File lib/minidoc/duplicate_key.rb, line 4
def self.duplicate_key_exception(exception)
  if exception.respond_to?(:error_code) && exception.error_code == DUPLICATE_KEY_ERROR_CODE
    new(exception.message, exception.error_code, exception.result)
  else
    nil
  end
end