class HexaPDF::MalformedPDFError

Raised when the PDF is invalid and can't be read correctly.

Attributes

pos[RW]

The byte position in the PDF file where the error occured.

Public Class Methods

new(message, pos: nil) click to toggle source

Creates a new malformed PDF error object for the given exception message.

The byte position where the error occured can either be given via the pos argument or later via the pos accessor but must be set before the exception message is retrieved.

Calls superclass method
# File lib/hexapdf/error.rb, line 51
def initialize(message, pos: nil)
  super(message)
  @pos = pos
end