lib/github_changelog_generator/octo_fetcher.rb
def check_github_response
      Retriable.retriable(retry_options) do
        yield
      end
    rescue MovedPermanentlyError => e
      Helper.log.error("#{e.class}: #{e.message}")
      sys_abort("The repository has moved, please update your configuration")
    rescue Octokit::Forbidden => e
      Helper.log.error("#{e.class}: #{e.message}")
      sys_abort("Exceeded retry limit")
    rescue Octokit::Unauthorized => e
      Helper.log.error("#{e.class}: #{e.message}")
      sys_abort("Error: wrong GitHub token")
    end
# This is wrapper with rescue block
#
# @return [Object] returns exactly the same, what you put in the block, but wrap it with begin-rescue block
This is wrapper with rescue block
This is wrapper with rescue block
def check_github_response
      Retriable.retriable(retry_options) do
        yield
      end
    rescue MovedPermanentlyError => e
      Helper.log.error("#{e.class}: #{e.message}")
      sys_abort("The repository has moved, please update your configuration")
    rescue Octokit::Forbidden => e
      Helper.log.error("#{e.class}: #{e.message}")
      sys_abort("Exceeded retry limit")
    rescue Octokit::Unauthorized => e
      Helper.log.error("#{e.class}: #{e.message}")
      sys_abort("Error: wrong GitHub token")
    end
def check_github_response Retriable . retriable ( retry_options ) do yield end rescue MovedPermanentlyError => e Helper . log . error ( "#{e.class}: #{e.message}" ) sys_abort ( "The repository has moved, please update your configuration" ) rescue Octokit :: Forbidden => e Helper . log . error ( "#{e.class}: #{e.message}" ) sys_abort ( "Exceeded retry limit" ) rescue Octokit :: Unauthorized => e Helper . log . error ( "#{e.class}: #{e.message}" ) sys_abort ( "Error: wrong GitHub token" ) end
This is wrapper with rescue block
This is wrapper with rescue block
returns exactly the same, what you put in the block, but wrap it with begin-rescue block
returns exactly the same what you put in the block but wrap it with begin - rescue block
Object