class Squelch::Error

Raised by {Squelch.obfuscate!} if obfuscation seems to have failed.

This might be raised either because the SQL was malformed in the first place or because of a bug in our parsing. See {Squelch} for more discussion.

Attributes

delimiter[R]

@return [String] the left over delimiter detected in {#obfuscation}

obfuscation[R]

@return [String] the invalid result of obfuscating {#sql}

sql[R]

@return [String] the original SQL input

Public Class Methods

new(sql, mismatched) click to toggle source
Calls superclass method
# File lib/squelch/error.rb, line 19
    def initialize(sql, mismatched)
      @sql = sql
      @obfuscation = mismatched.string
      @delimiter = mismatched.to_s
      super(<<~MSG.strip)
        Failed to squelch SQL, delimiter #{delimiter} remained after obfuscation
      MSG
    end