Sha256: 6d0c881e79850019d24e44565adc63fb9363d095ddf388e28358d042aa92245e
Contents?: true
Size: 735 Bytes
Versions: 11
Compression:
Stored size: 735 Bytes
Contents
# encoding: utf-8 module LocalPac module ProxyPac class PACEngine private attr_reader :engine, :file public def initialize(options = {}) @file = options.fetch(:file) @engine = PAC rescue KeyError fail ArgumentError, ":file-option is missing" end def find(uri) e = engine.source(file.content) e.find(uri) rescue V8::Error, PAC::ProgramError => err error_id = LocalPac.error_id LocalPac.ui_logger.fatal "Error id \"#{error_id}\": An V8::Error occured. This can happen if compiling a proxy.pac fails. The V8::Error-message was: #{err.message}." fail Exceptions::PacFileInvalid, error_id end end end end
Version data entries
11 entries across 11 versions & 1 rubygems