Exception: Pdfrb::MalformedPdfError

Inherits:
ParseError show all
Defined in:
lib/pdfrb/error.rb

Overview

A PDF file violates the spec but Pdfrb recovered (or attempted to). recovered? tells the caller whether reconstruction succeeded.

Instance Attribute Summary collapse

Attributes inherited from ParseError

#source_position

Instance Method Summary collapse

Constructor Details

#initialize(message, recovered: false, **opts) ⇒ MalformedPdfError

Returns a new instance of MalformedPdfError.



32
33
34
35
# File 'lib/pdfrb/error.rb', line 32

def initialize(message, recovered: false, **opts)
  @recovered = recovered
  super(message, **opts)
end

Instance Attribute Details

#recoveredObject (readonly)

Returns the value of attribute recovered.



30
31
32
# File 'lib/pdfrb/error.rb', line 30

def recovered
  @recovered
end

Instance Method Details

#recovered?Boolean

Returns:

  • (Boolean)


37
# File 'lib/pdfrb/error.rb', line 37

def recovered? = @recovered