Exception: RFF::ProcessingFailure

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/exceptions.rb

Overview

This exception is thrown on FFmpeg processing error

Instance Method Summary collapse

Constructor Details

#initialize(exitcode, msg = nil) ⇒ ProcessingFailure

Initializes the exception with arguments

  • exitcode (required) - FFmpeg exit code

  • msg - Message describing the error. Defaults to nil



16
17
18
19
# File 'lib/exceptions.rb', line 16

def initialize(exitcode, msg=nil)
  @msg = msg
  @exitcode = exitcode
end

Instance Method Details

#to_sObject

Returns message describing the error (exit code and describing message if it is present)



23
24
25
26
27
28
29
# File 'lib/exceptions.rb', line 23

def to_s
  if msg.nil?
    exitcode.to_s
  else
    msg + exitcode.to_s
  end
end